Lossless Tiling in Convolution Networks - Tiling Configuration for a Sequence of Sections of a Graph

ABSTRACT

Disclosed is a data processing system that includes compile time logic to section a graph into a sequence of sections including a first section and a second section. The compile time logic is to configure the first section with a first topology of tiling configurations in which to tile inputs, intermediate outputs, and final outputs of the first section, and configure the second section with a second topology of tiling configurations in which to tile inputs, intermediate outputs, and final outputs of the second section. The data processing system further includes runtime logic configured with the compile time logic to execute the first section to generate the inputs, intermediate outputs, and final outputs of the first section in the first topology of tiling configurations, and execute the second section to generate the inputs, intermediate outputs, and final outputs of the second section in the second topology of tiling configurations.

PRIORITY APPLICATION

This application is a divisional of U.S. patent application Ser. No.17/216,651, entitled “LOSSLESS TILING IN CONVOLUTION NETWORKS—TILINGCONFIGURATION,” filed Mar. 29, 2021 (Attorney Docket No. SBNV 1034-2).The non-provisional application is incorporated by reference for allpurposes.

FIELD OF THE TECHNOLOGY DISCLOSED

The technology disclosed relates to enhanced tiling within a neuralnetwork, which can be implemented using processors like CentralProcessing Units (CPUs), Graphics Processing Units (GPUs), FieldProgrammable Gate Arrays (FPGAs), Coarse-Grained ReconfigurableArchitectures (CGRAs), Application-Specific Integrated Circuits (ASICs),Application Specific Instruction-set Processor (ASIP), and DigitalSignal Processors (DSPs). In particular, the technology disclosedrelates to using tiling to process relatively large input sizes.

INCORPORATIONS

The following are incorporated by reference for all purposes as if fullyset forth herein:

-   Prabhakar et al., “Plasticine: A Reconfigurable Architecture for    Parallel Patterns,” ISCA '17, Jun. 24-28, 2017, Toronto, ON, Canada;-   Koeplinger et al., “Spatial: A Language And Compiler For Application    Accelerators,” Proceedings Of The 39th ACM SIGPLAN Conference On    Programming Language Design And Implementation (PLDI), Proceedings    of the 43rd International Symposium on Computer Architecture, 2018;-   U.S. Non-provisional patent application Ser. No. 16/239,252, filed    Jan. 3, 2019, entitled, “VIRTUALIZATION OF A RECONFIGURABLE DATA    PROCESSOR,” (Attorney Docket No. SBNV 1000-1);-   U.S. Non-provisional patent application Ser. No. 16/197,826, filed    Nov. 21, 2018, entitled, “CONFIGURATION LOAD OF A RECONFIGURABLE    DATA PROCESSOR,” (Attorney Docket No. SBNV 1001-1A);-   U.S. Non-provisional patent application Ser. No. 16/198,086, filed    Nov. 21, 2018, entitled, “CONFIGURATION UNLOAD OF A RECONFIGURABLE    DATA PROCESSOR,” (Attorney Docket No. SBNV 1001-1B);-   U.S. Non-provisional patent application Ser. No. 16/260,548, filed    Jan. 29, 2019, entitled, “MATRIX NORMAL/TRANSPOSE READ AND A    RECONFIGURABLE DATA PROCESSOR INCLUDING SAME,” (Attorney Docket No.    SBNV 1005-1);-   U.S. Non-provisional patent application Ser. No. 16/536,192, filed    Aug. 8, 2019, entitled, “COMPILER FLOW LOGIC FOR RECONFIGURABLE    ARCHITECTURES,” (Attorney Docket No. SBNV 1006-1);-   U.S. Non-provisional patent application Ser. No. 16/407,675, filed    May 9, 2019, entitled, “CONTROL FLOW BARRIER AND RECONFIGURABLE DATA    PROCESSOR,” (Attorney Docket No. SBNV 1007-1);-   U.S. Non-provisional patent application Ser. No. 16/504,627, filed    Jul. 8, 2019, entitled, “QUIESCE RECONFIGURABLE DATA PROCESSOR,”    (Attorney Docket No. SBNV 1008-1);-   U.S. Non-provisional patent application Ser. No. 16/572,516, filed    Sep. 16, 2019, entitled, “EFFICIENT EXECUTION OF OPERATION UNIT    GRAPHS ON RECONFIGURABLE ARCHITECTURES BASED ON USER SPECIFICATION,”    (Attorney Docket No. SBNV 1009-2);-   U.S. Non-provisional patent application Ser. No. 16/744,077, filed    Jan. 15, 2020, entitled, “COMPUTATIONALLY EFFICIENT SOFTMAX LOSS    GRADIENT BACKPROPAGATION,” (Attorney Docket No. SBNV 1010-1);-   U.S. Non-provisional patent application Ser. No. 16/590,058, filed    Oct. 1, 2019, entitled, “COMPUTATION UNITS FOR FUNCTIONS BASED ON    LOOKUP TABLES,” (Attorney Docket No. SBNV 1011-1);-   U.S. Non-provisional patent application Ser. No. 16/695,138, filed    Nov. 25, 2019, entitled, “COMPUTATIONAL UNITS FOR BATCH    NORMALIZATION,” (Attorney Docket No. SBNV 1012-1);-   U.S. Non-provisional patent application Ser. No. 16/688,069, filed    Nov. 19, 2019, entitled, “LOOK-UP TABLE WITH INPUT OFFSETTING,”    (Attorney Docket No. SBNV 1013-1);-   U.S. Non-provisional patent application Ser. No. 16/718,094, filed    Dec. 17, 2019, entitled, “COMPUTATIONAL UNITS FOR ELEMENT    APPROXIMATION,” (Attorney Docket No. SBNV 1014-1);-   U.S. Non-provisional patent application Ser. No. 16/560,057, filed    Sep. 4, 2019, entitled, “SIGMOID FUNCTION IN HARDWARE AND A    RECONFIGURABLE DATA PROCESSOR INCLUDING SAME,” (Attorney Docket No.    SBNV 1015-1);-   U.S. Non-provisional patent application Ser. No. 16/572,527, filed    Sep. 16, 2019, entitled, “PERFORMANCE ESTIMATION-BASED RESOURCE    ALLOCATION FOR RECONFIGURABLE ARCHITECTURES,” (Attorney Docket No.    SBNV 1016-2);-   U.S. Non-provisional patent application Ser. No. 15/930,381, filed    May 12, 2020, entitled, “COMPUTATIONALLY EFFICIENT GENERAL    MATRIX-MATRIX MULTIPLICATION (GeMM),” (Attorney Docket No. SBNV    1019-1);-   U.S. Non-provisional patent application Ser. No. 16/890,841, filed    Jun. 2, 2020, entitled, “ANTI-CONGESTION FLOW CONTROL FOR    RECONFIGURABLE PROCESSORS,” (Attorney Docket No. SBNV 1021-1);-   U.S. Non-provisional patent application Ser. No. 16/922,975, filed    Jul. 7, 2020, entitled, “RUNTIME VIRTUALIZATION OF RECONFIGURABLE    DATA FLOW RESOURCES,” (Attorney Docket No. SBNV 1026-1);-   U.S. Non-provisional patent application Ser. No. 16/996,666, filed    Aug. 18, 2020, entitled, “RUNTIME PATCHING OF CONFIGURATION FILES,”    (Attorney Docket No. SBNV 1027-1);-   U.S. Non-provisional patent application Ser. No. 17/023,015, filed    Sep. 16, 2020, “COMPILE TIME LOGIC FOR DETECTING STREAMING    COMPATIBLE AND BROADCAST COMPATIBLE DATA ACCESS PATTERNS” (Attorney    Docket No. SBNV 1022-1); and-   U.S. Non-provisional patent application Ser. No. 17/031,679, filed    Sep. 24, 2020, “SYSTEMS AND METHODS FOR MEMORY LAYOUT DETERMINATION    AND CONFLICT RESOLUTION” (Attorney Docket No. SBNV 1023-1).

BACKGROUND

The subject matter discussed in this section should not be assumed to beprior art merely as a result of its mention in this section. Similarly,a problem mentioned in this section or associated with the subjectmatter provided as background should not be assumed to have beenpreviously recognized in the prior art. The subject matter in thissection merely represents different approaches, which in and ofthemselves can also correspond to implementations of the claimedtechnology.

With advent of higher resolution image capturing devices, sizes of imagedatasets used in various applications are increasing correspondingly.For example, images in 4k resolution (e.g., 3840×2160 pixel resolution)are now widely available, and even higher resolution images (such as upto, or even higher than 8k) can be captured. Medical images, such as a3-dimensional (3D) Computerized Tomography (CT) scan or a pathologyimage, can have 10⁸ to 10⁹, or even higher numbers of pixels. A wholeslide image used in medical applications can have billions of pixels. Itis difficult to process such images in machine learning or neuralnetworks, such as Convolutional Neural Networks (CNN), Fully ConnectedNeural Networks (FCNN), Recurrent Neural Networks (RNN), Long Short-TermMemory (LSTM) networks, autoencoders, deep belief networks, GenerativeAdversarial Networks (GAN), and/or the like. For example, processing arelatively large sized image requires a corresponding relatively largesized memory and/or large processing power. For example, a singleconvolution activation of a 3D image having 512×512×512 pixels and with64 out channels can occupy about 137 GB RAM (Random Access Memory).

When handling such large sized images, downsampling of the image to alower resolution is often employed, although such downsampling resultsin loss of information, which can result in relatively less accurateimage analysis results. In another example, the image can be split intopatches, and different patches can be handled using different models ordifferent neural networks, and a decision fusion model can be used tofuse decisions from the different models. However, such handling ofimages requires patch level annotations and can be accompanied by othercomplications. Also, very large input images (e.g., comprising billionsof pixels) may not often be satisfactorily processed using thepatch-based approach, and the patch-based approach also suffers frominsufficient labels usable for image identification tasks.

Yet another approach towards handling relatively large image is toexecute data parallelism across spatial dimension of the image, e.g.,using Mesh-TensorFlow, which is a framework for large scale data andmodel parallelism. With this technique, a 3D Unet is trained on up to,in an example, 512×512×512 resolution data. For example, the image isspatially partitioned. Each computational device (such as GPUs and/orTensor Processing Units (TPUs)) processes corresponding patches. Beforeevery convolution operation, the computational devices exchange patchmargins (e.g., half the size of the convolution kernel) with each other,which results in increased computational burden.

The above discussed procedures and supporting structures for processingsuch large sized images using machine learning models can be complex,and the execution of the procedures can be time consuming andcomputationally expensive.

Thus, computationally efficient means for processing such large sizedimages using machine learning models is desired.

BRIEF DESCRIPTION OF THE DRAWINGS

The patent or application file contains at least one drawing executed incolor. Copies of this patent or patent application publication withcolor drawing(s) will be provided by the Office upon request and paymentof the necessary fee.

In the drawings, like reference characters generally refer to like partsthroughout the different views. Also, the drawings are not necessarilyto scale, with an emphasis instead generally being placed uponillustrating the principles of the technology disclosed. In thefollowing description, various implementations of the technologydisclosed are described with reference to the following drawings, inwhich:

FIG. 1 is a diagram illustrating a system including a host, a memory,and an example data processor.

FIG. 2 illustrates compilation and execution of configuration files inthe system of FIG. 1.

FIGS. 3A and 3B illustrate tiling of a tensor into a plurality of tilesand subsequent convolution of the tiles, where there are no overlapsamong neighboring tiles within the tensor.

FIG. 4A illustrates tiling of an input tensor into a plurality of tilesand subsequent convolution of the tiles, where neighboring tiles in theinput tensor partially overlap.

FIGS. 4B-4D illustrate tiling of an input tensor into a plurality oftiles and subsequent two successive convolutions of the tiles, whereneighboring tiles in the input tensor partially overlap.

FIG. 5 illustrates tiling of an input tensor into a plurality ofoverlapping tiles, and subsequent two successive convolution operationsof the tiles, where the tiles are individually padded during eachconvolution operation.

FIG. 6A illustrates zero padding of an input tensor, and subsequenttiling of the zero-padded input tensor.

FIG. 6B illustrates tiling of a zero-padded input tensor into aplurality of overlapping tiles, and subsequent two-stage convolution ofthe tiles.

FIG. 6C illustrates the padding and tiling operations of FIGS. 6A and6B, with one or more lines of peripheral pixels of an intermediatetensor being forced to zero.

FIG. 7A illustrates padding an input tensor to form a padded inputtensor, where the padded input tensor is then tiled in a plurality oftiles.

FIG. 7B illustrates forcing peripheral pixels of intermediate tensors ofboth forward and back-propagation path of a neural network to zero.

FIGS. 8A and 8B respectively illustrate materialization of a firstexample tensor and a second example tensor, where during thematerialization, the two example tensors are stored in a memory that isexternal to a data processor.

FIG. 9A illustrates an example section of a processing graph comprisingtwo processing nodes implementing convolution operations, and oneprocessing node implementing max-pooling operation.

FIG. 9B illustrates two example sections of a forward path of aprocessing graph.

FIG. 9C illustrates transformation of an output tensor of a firstsection of a processing graph, to generate an input tensor of asucceeding second section of the processing graph, wherein thetransformation includes zero-padding the output tensor and re-tiling thezero-padded tile.

FIG. 9D illustrates a tiling materialization node between two adjacentsections and of a processing graph.

FIG. 9E illustrates a manner in which a tensor is materialized, wherethe tensor is within a section and is not an input or output tile of anysection.

FIG. 9F illustrates processing and/or materialization of tensors at twosections of forward pass of a processing graph.

FIG. 10A illustrates a processing graph comprising one forward sectionand one backward section.

FIG. 10B illustrates tile-wise calculation of weight gradient for alayer in a backward section of a processing graph.

FIG. 10C illustrates a processing graph comprising multiple forwardsections and multiple backward sections.

FIG. 11A illustrate a “read-modify-write” operation, to transform anoutput of an output layer of a backward section to an input of an inputlayer of a subsequent backward section.

FIG. 11B illustrates reconfiguration of an output tensor, which isoutput by a backward section, to generate tiles of an input tensor ofthe subsequent backward section, where the input tensor has peripheralpixels that are ignored or discarded when generating the tiles of theinput tensor.

FIG. 12A illustrates a flowchart depicting a method for generating graphmetadata that includes tiling decisions for a processing graph, andcompiling the processing graph based on the tiling decisions included inthe metadata.

FIG. 12B illustrates example sections of a processing graph, and alsoillustrates notations used in discussing the method of FIG. 12A.

FIG. 13 is a simplified block diagram of components of a CGRA(Coarse-Grained Reconfigurable Architecture) processor.

FIG. 14A is a simplified diagram of a tile and an array level networkusable in the configuration of FIG. 13, where the configurable units inthe array are nodes on the array level network and are configurable toimplement the processing graphs and various processing nodes of varioussections discussed herein.

FIG. 14B illustrates an example switch unit connecting elements in anarray level network.

DETAILED DESCRIPTION

The following discussion is presented to enable any person skilled inthe art to make and use the technology disclosed and is provided in thecontext of a particular application and its requirements. Variousmodifications to the disclosed implementations will be readily apparentto those skilled in the art, and the general principles defined hereinmay be applied to other implementations and applications withoutdeparting from the spirit and scope of the technology disclosed. Thus,the technology disclosed is not intended to be limited to theimplementations shown but is to be accorded the widest scope consistentwith the principles and features disclosed herein.

Elements referred to herein with a common reference label followed by aparticular number or alphabet may be collectively referred to by thereference label alone. For example, tiles 308 a, 308 b, . . . , 308R(illustrated in FIG. 3A) may be collectively and generally referred toas tiles 308(a-R) or simply as tiles 308 in plural, and tile 308 insingular.

System Architecture

Systems and processes for tiling images that are processed by a neuralnetwork (such as a CNN, or another type of neural network) aredescribed. The systems and processes will be described with reference toFIG. 1 showing an architectural level schematic of a system 100undertaking tiling decisions and implementing tiling of the varioustensors in accordance with an implementation. Because FIG. 1 is anarchitectural diagram, certain details of the system 100 areintentionally omitted to improve the clarity of the description. It maybe noted that system 100 can include the same, more, or fewer elementsconfigured in the same or different manner in other implementations.

FIG. 1 is a diagram illustrating a system 100 including a host 120, amemory 140, and an example data processor 110. As shown in the exampleof FIG. 1, the data processor 110 includes an array 190 of units and aconfiguration load/unload controller 195. In an embodiment, the dataprocessor 110 is a reconfigurable data processor 110, and the array 190ofunits comprises an array of configurable units.

Examples of units in the array 190 are further described later in thisdisclosure, e.g., with respect to FIG. 13. Individual ones of the unitscan include, or can have units configured to implement, a computationunit or a memory unit, as described herein. Examples of the dataprocessor 110 include Graphics Processing Unit (GPU), Central ProcessingUnit (CPU), Field Programmable Gate Arrays (FPGAs), Coarse-GrainedReconfigurable Architectures (CGRAs), Application-Specific IntegratedCircuits (ASICs), and Application Specific Instruction-set Processor(ASIP). In an example where the data processor 110 is a reconfigurabledata processor, examples of the data processor 110 includes FPGAs,CGRAs, ASICs, and ASIP.

Various examples and embodiments discussed herein assume that the dataprocessor 110 is a reconfigurable data processor, and units within thearray 190 are configurable units. However, such an assumption is tofacilitate discussion of the examples and embodiments, and not limit thescope of this disclosure. For example, the tiling decisions and tilingof tensors, as discussed throughout this disclosure, can be performed bya reconfigurable data processor, and can also be performed bynon-reconfigurable data processors (such as GPUs and/or CPUs).

The data processor 110 includes an external I/O interface 130 connectedto the host 120 by line 125, and an external I/O interface 150 connectedto the memory 140 by line 145. The I/O interfaces 130, 150 connect via abus system 115 to the array 190 of processing units and to theconfiguration load/unload controller 195.

The memory 140 is within a chip that is different from a chip comprisingthe data processor 110, and hence, the memory 140 is also referred toherein as an off-chip memory. In contrast, the reconfigurable array ofunits 190 comprises configurable memory units (such as local memory 128illustrated in FIG. 2), which are referred to herein as on-chip memory.

In an example where the data processor 110 is a reconfigurable dataprocessor and where the processing units within the array 190 areconfigurable units, the configurable units can be configured to performspecific operations. For example, the array 190 is an array ofconfigurable units, which includes configurable compute units andconfigurable memory units in a programmable interconnect fabric. Thearray of configurable units in a reconfigurable processor ispartitionable into a plurality of subarrays (or tiles) of configurableunits, as will be discussed herein in turn.

The host 120 executes a compiler 106 to compile applications and aruntime logic 108 to execute the compiled applications on the dataprocessor 110. For example, the compiler 106 compiles a high-levelapplication and generates one or more corresponding configuration files.The runtime logic 108 is configured to load and execute the one or moreconfiguration files on the reconfigurable data processor 110. Thereconfigurable data processor 110 is configured to process theconfiguration files and generate corresponding outputs.

For example, to configure the configurable units in the array 190 ofconfigurable units with a configuration file, the host 120 can send theconfiguration file to the memory 140 via the I/O interface 130, the bussystem 115, and the I/O interface 150 in the reconfigurable dataprocessor 110. The configuration file can be loaded in many ways, assuits a particular architecture, including in data paths outside thedata processor 110. The configuration file can be retrieved from thememory 140 via the memory I/O interface 150. Chunks of the configurationfile can then be sent in a distribution sequence to configurable unitsin the array 190 of configurable units in the reconfigurable dataprocessor 110.

The host 120 also executes a graph metadata generation logic 109, whichgenerates graph metadata. For example, as will be discussed herein infurther detail, individual tensors processed by the neural networkexecuted in the system 100 can be divided in multiple tiles, and graphmetadata associated with a tensor stores tiling information associatedwith the tensor.

An external clock generator 170 or other clock line sources can providea clock line 175 or clock lines to elements in the reconfigurable dataprocessor 110, including the array 190 of configurable units, and thebus system 115, and the external data I/O interfaces. The bus system 115can communicate data at a processor clock rate via a clock line 175 orclock lines.

FIG. 2 illustrates compilation and execution of configuration files inthe system 100 of FIG. 1. At operation 240, the compiler 106 receives anapplication 204 for compilation. The application, for example, is aneural network application. The application involves processing tensorsusing a neural network, such as a CNN. In an embodiment, the application204 includes information (such as metadata) specifying tensordimensionality 212, which provides dimensions of input tensors, outputtensors, and/or one or more intermediate tensors.

At operation 241, the compiler 106 compiles the application 204 togenerate one or more configuration files 216. The configuration files216 include a plurality of functions. Examples of functions in theplurality of functions include, but are not limited to, non-linearitieslike Rectified Linear Unit (ReLU) and its variants (e.g., leaky ReLU),convolution, transpose convolution, hyperbolic tangent, sigmoid, andsoftmax, element-wise addition, matrix multiplication (e.g., GeneralMatrix Multiply (GeMM)), layer normalization (e.g., batchnormalization), loss functions like cross-entropy, and tensor shapemodifiers like transpose. In an embodiment, the configuration files 216also include tiling decisions 220. In an embodiment, the tilingdecisions are included in metadata included in the configuration files216. Tiling decisions 220 provide dimensionality and/or number of tilesin various tensors received, generated, and/or output by the system 100while executing the configuration files 216, as will be discussed infurther detail herein.

At operation 242, the compiler 106 sends the configuration files 216 tothe runtime logic 110 for execution. At operation 243, the runtime logic100 loads the configuration files 216 (or at least sections of theconfiguration files 216) and/or the data therefor (e.g., weights,coefficients, vectors, tensors (image data, audio data, natural languageprocessing (NLP data), control data (e.g., control tokens)) on one ormore of reconfigurable processors 124 a, 124 b, . . . , 124N and/orreconfigurable local memory 128 a, 128 b, . . . , 128M of thereconfigurable array of units 190. In an embodiment, the reconfigurablearray of units 190 implements processing logic 284 that processes thevarious functions included in the configuration files 216.

In an embodiment, the reconfigurable array of units 190 and/or the host120 also executes one or more of padding logic 280 that pads an inputtensor with zero-valued peripheral pixels, tiling logic that tiles (orre-tiles) a tensor into multiple corresponding tiles, and data flowlogic 286 that facilitates materializing individual tiles (e.g., bystoring the tiles to the off-chip memory 140) and facilitates readingindividual tiles from the memory 140. Each of these logics 280, 282, and286 will be discussed in further detail herein.

Having described the reconfigurable processor, the discussion now turnsto a manner in which tensors are processed by the reconfigurableprocessor.

Non-Overlapping Tiling

Tiling is often employed to process large sized tensors. In tiling, aninput tensor is tiled or divided into multiple tiles or sections, duringa forward pass and/or a backward pass of a neural network. FIGS. 3A and3B illustrate tiling of a tensor 304 into a plurality of tiles 308 a, .. . , 308R and subsequent convolution of the tiles, where there are nooverlaps among neighboring tiles. FIG. 3A illustrates a 3D perspectiveview of the tiling process merely for illustration purposes, whereasFIG. 3B illustrate a 2D view of the tiling process. Note that theunderlying tensor 304 can be a 2D or a 3D image, or is derived from suchan image (e.g., by convoluting the image and/or otherwise processing theimage). In the example of FIGS. 3A and 3B, the tiles 308 a, . . . , 308Rare non-overlapping tiles, e.g., two neighboring tiles do not have anyoverlapping region. In FIG. 3B, each of the tiles 308 a, . . . , 308R isconvolved with a kernel 312 (illustrated in FIG. 3A) during aconvolution operation 316, to generate a corresponding one of aplurality of tiles 316 a, 316 b, . . . , 316R, respectively, of anoutput tensor 318 (illustrated in FIG. 3B). For example, tile 308 a isconvolved to generate a corresponding tile 316 a, tile 308 b isconvolved to generate a corresponding tile 316 b, and so on. The outputtensor 318 is a combination of the non-overlapping tiles 316 a, 316 b, .. . , 316R. Although not illustrated, the tiles 316 a, . . . , 316R canbe further convolved or processed by another operation (e.g.,max-pooling) within the neural network.

Overlapping Tiling

FIG. 4A illustrates tiling of an input tensor 402 into a plurality oftiles 404 a, . . . 404 d and subsequent convolution of the tiles, whereneighboring tiles in the input tensor 402 partially overlap. AlthoughFIG. 4A illustrates the input tensor 402 being tiled into merely fourtiles, such a number of tiles is merely an example and is not intendedto limit the scope of this disclosure. In other examples, the inputtensor 402 can be tiled into a higher number of tiles, such as 9, 16,25, 64, or higher, and is implementation specific. In an example, thenumber of tiles is based on a variety of factors, such as a size of theinput tensor 402, a memory and/or processing capacity of the networkprocessing the tensors, a configuration (such as a number of layers) ofthe network, and/or the like. Calculating the size of the tiles and/orthe overlaps will be discussed in further detail herein in turn (e.g.,with respect to FIG. 12A).

FIG. 4A illustrates the boundary of various tiles using respectivecolors, where the color drawing can be obtained from the U.S. Patent andTrademark Office upon request. For example, the boundary of tile 404 ais illustrated using red, the boundary of tile 404 b is illustratedusing green, and so on. Throughout this disclosure, where a tensorcomprises four tiles and the tiles are illustrated using differentrespective colors, generally, the top-left tile boundary is illustratedin red, the top-right tile boundary is illustrated in green, thebottom-left tile boundary is illustrated in blue, and the bottom-righttile boundary is illustrated in orange color.

As seen, neighboring tiles in the input tensor 402 partially overlap.FIG. 4A also illustrates example dimensions of various tiles, anddimensions of the overlapping sections. The dimensions are mere examplesand are not intended to limit the scope of the disclosure. For example,the input tensor 402 has a dimension of 34×34 pixels, and individualtiles 404 has a dimension of 18×18 pixels. Thus, in an embodiment, eachtile within the input tensor 402 has the same dimension.

Two tiles in a tensor are neighboring tiles if the two tiles have atleast one immediate adjacent edge and/or an immediate adjacent corner.Thus, in the input tensor 402 that is divided into 4 tiles, each tile isa neighboring tile to the other tiles. Thus, each tile has threeneighboring tiles in the input tensor 402. For example, a right sectionof the tile 404 a overlaps with a left section of the tile 404 b, togenerate an overlapping section 405 comprising 18×2 pixels. Thus, pixelswithin the overlapping section 405 are common to both tiles 404 a and404 b. Similarly, a 2×18 bottom section of the tile 404 a overlaps witha 2×18 top section of the tile 404 c, and a 2×2 right-bottom section ofthe tile 404 a overlaps with a left-top section of the tile 404 d. Asillustrated, the central 2×2 overlap region 407 is common to all thefour tiles 404 a, . . . , 404 d.

Also illustrated in FIG. 4A is a convolution operation within aprocessing node or layer 406 of a neural network, in which a kernel isconvolved with each tile 404, to generate a corresponding tile 424 of anoutput tensor 412. The lower portion of FIG. 4A illustrates howindividual tile 404 is convolved with the kernel to generate acorresponding tile 424 a (note that the lower portion of the figureshows the tiles in non-overlapping manner, for clearly depicting thetile-wise convolution operations). For example, tile 404 a is convolvedto generate a corresponding tile 424 a, tile 404 b is convolved togenerate a corresponding tile 424 b, and so on. The output tensor 412 isa combination of the tiles 424 a, . . . , 424 d. Although notillustrated, the tiles 424 a, . . . , 424 d can be further convolved orprocessed by another operation (e.g., max-pooling) within the neuralnetwork.

To generate an output tile of a certain size, the corresponding inputtile size is determined from the receptive field of the filter used forthe convolution operation. For example, a tiling that is to be performedat a section output is initially determined. Then, using the informationabout the receptive field of each operation in the section, an algorithm(e.g., discussed with respect to FIG. 12A) works backwards through thesection until it reaches the input. In other words, the tile size of theoutput is used to calculate the tile size of the input. During aconvolution operation, dimensions of an input tile (e.g., input tile 404of the input tensor 402) can be different from the dimensions of thecorresponding output tile (e.g., output tile 424 of the output tensor412). For example, an output width W_(o) and an output height H_(o) ofthe output receptive field is given by:

$\begin{matrix}{W_{o} = {\frac{W_{i} - K_{w} + P_{w}}{S_{w}} + 1}} & {{Equation}1} \\{H_{o} = {\frac{H_{i} - K_{h} + P_{h}}{S_{h}} + 1}} & {{Equation}2}\end{matrix}$

In equations 1 and 2, W_(i) and H_(i) are a width and a height,respectively, of the input tile; K_(w) and K_(h) are a width and aheight, respectively, of the convolution kernel used during theconvolution operation; P_(w) and P_(h) are convolution padding used inhorizontal and vertical directions, respectively of the convolutionoperation; and S_(w) and S_(h) are strides in horizontal and verticaldirections, respectively, of the convolution operation.

For example, for FIG. 4A, assume that the underlying convolution 406uses a 3×3 filter with a stride of 1 and equal padding. The output 412is a 32×32 tensor that is split into 4 non-overlapping 16×16 tiles 424.When tiling is enabled, the convolution to generate each output tile 424is performed as a valid padding convolution that uses a correspondinginput tile 404 of size 18×18 from an input tensor 402 of size 34×34.

FIG. 4B illustrates tiling of an input tensor 429 into a plurality oftiles 430 a, . . . 430 d and subsequent two successive convolutions ofthe tiles, where neighboring tiles in the input tensor 429 partiallyoverlap. Thus, while FIG. 4A illustrates a single convolution, FIG. 4Billustrates two convolution operations.

Although FIG. 4B (and various other figures discussed herein)illustrates the input tensor being tiled into merely four tiles, such anumber of tiles is merely an example and is not intended to limit thescope of this disclosure. FIG. 4B illustrates the boundary of varioustiles using respective colors. For example, the boundary of tile 430 ais illustrated using red, the boundary of tile 430 b is illustratedusing green, and so on. As seen, neighboring tiles in the input tensor429 partially overlap.

FIG. 4B also illustrates example dimensions of various tiles, anddimensions of the overlapping sections, which are mere examples and arenot intended to limit the scope of the disclosure. For example, theinput tensor 429 has a dimension of 36×36 pixels, and individual tiles430 has a dimension of 20×20 pixels. Thus, in an embodiment, each tile430 within the input tensor 429 has the same dimension.

In the input tensor 429 that is divided into 4 tiles, each tile is aneighboring tile to the other tiles. For example, a right section of thetile 430 a overlaps with a left section of the tile 430 b, to generatean overlapping section 431 comprising 20×4 pixels. Thus, pixels withinthe overlapping section 431 are common to both tiles 430 a and 430 b.Similarly, a 4×20 bottom section of the tile 430 a overlaps with a topsection of the tile 430 c, and a 4×4 right-bottom section of the tile430 a overlaps with a left-top section of the tile 430 d.

Also illustrated in FIG. 4B is a first convolution operation performedby processing node or layer 432, in which a kernel is convolved witheach tile 430, to generate a corresponding tile 434 of an intermediatetensor 433. For example, tile 430 a is convolved with the kernel togenerate a corresponding tile 434 a, tile 430 b is convolved with thekernel to generate a corresponding tile 434 b, and so on. Theintermediate tensor 433 is a combination of the tiles 434 a, . . . , 434d.

During the convolution in the layer 432, a padding of 0, a 3×3 kernel,and a stride of 1 are used. Accordingly, referring to equations 1, 2 andFIG. 4B, a width of each tile 434 of the intermediate tensor 433 isgiven by (20−3+0)/1+1=18, and similarly a height of each tile 434 of theintermediate tensor 433 is also 18, as illustrated in FIG. 4B. Thus,individual 18×18 tiles 434 form the intermediate tensor 433 of size34×34. Thus, there is an overlap among neighboring tiles in theintermediate tensor 433. The dimensions of the tiles, the overlaps, andthe overall tensor dimensions for the intermediate tensor 433 aresimilar to those discussed with respect to the input tensor 402discussed with respect to FIG. 4A.

Also illustrated in FIG. 4B is a second convolution operation performedby the processing node 436, in which a kernel is convolved with eachtile 434 of the intermediate tensor 433, to generate a correspondingtile 444 of an output tensor 446. For example, tile 434 a is convolvedwith the kernel to generate a corresponding tile 444 a, tile 434 b isconvolved with the kernel to generate a corresponding tile 444 b, and soon. The output tensor 446 is a combination of the tiles 444 a, . . . ,444 d.

It may be noted that the terms input tensor and output tensor arerelative to the figure in which these are displayed and used for ease ofdiscussion, and need not be an input to a neural network or an output ofthe neural network. For example, the output tensor 446 can be furtherconvolved, and hence, the output tensor 446 would be an input for thatconvolution operation.

During the convolution 436, a padding of 0, a 3×3 kernel, and a strideof 1 are used. Accordingly, referring to equations 1, 2 and FIG. 4B, awidth of each tile 444 of the output tensor 446 is given by(18−3+0)/1+1=16, and similarly a height of each tile 444 of the outputtensor 446 is also 16, as illustrated in FIG. 4B. Thus, individual 16×16tiles 444 form the output tensor 446 of size 32×32. Thus, there is nooverlap among the tiles 444 in the output tensor 446.

FIGS. 4C and 4D illustrate the convolution operations of FIG. 4B infurther details. For example, in FIG. 4C, the shaded tile 430 a of theinput tensor 429 is convolved to generate the shaded tile 434 a of theintermediate tensor 433, and the shaded tile 434 a of the intermediatetensor 433 is further convolved to generate the shaded tile 444 a of theoutput tensor 446. Similarly, in FIG. 4D, the shaded tile 430 b of theinput tensor 429 is convolved to generate the shaded tile 434 b of theintermediate tensor 433, and the shaded tile 434 b of the intermediatetensor 433 is further convolved to generate the shaded tile 444 b of theoutput tensor 446. Thus, FIGS. 4C and 4D depict a tile-wise convolution,where a first tile is convolved separately from a second tile. Theconvolutions of the various tiles can occur in parallel, orsequentially, and independent to each other.

Overlapping Tiling, and then Individual Tile-Padding During Convolution

Due to tiling and the receptive fields of the convolutional operationsin a section, the peripheral input tiles may contain pixels outside theboundary of the original input. These out of bounds pixels arezero-padded for every successive convolutional layer in the section. Forany given convolution layer, a relatively small number of pixels can beoutside the boundary of the original input, but this can increase andexacerbate as many successive convolutional layers are applied. In anexample, to address this issue, extra pixels are added around theboundary of the tensor or receptive field to be convolved, thusincreasing the effective size of the image and preserving edge pixelinformation. In an example, these filler pixels added along one or moreedges have zero value. Addition of filler pixels added along one or moreedges of a receptive field is also referred to herein as “padding.” Whenthe filler pixels have zero values, such addition of the filler pixelsare also referred to herein as “zero-padding.”

FIG. 5 illustrates tiling of an input tensor 502 into a plurality ofoverlapping tiles (where example tiles 504 a, 504 d are illustrated inthe figure), and two subsequent successive convolution operations of thetiles, where the tiles are individually padded during each convolutionoperation. Although the input tensor 502 is tiled into multiple tiles,merely two example tiles are illustrated for purposes of illustrativeclarity.

The tiles 504 of the input tensor 502 are individually convolved atprocessing node 556, to generate corresponding tiles 564 of anintermediate tensor 562. The tiles 564 of the intermediate tensor 562are individually convolved at processing node 566, to generatecorresponding tiles 524 of an output tensor 530. The output tensor 530has a target size of 32×32, with each non-overlapping tile 524 havingdimensions of 8×8.

Each of the tiles 504 a, 504 d is convolved with a kernel during aconvolution operation at the processing node 556, to generate acorresponding one of tiles 564 a, 564 d, respectively, of theintermediate tensor 562. During the convolution operation, edges ofindividual tiles are padded with one or more lines of pixels arrangedalong a periphery of the corresponding tile. Individual padded tile 504is convolved with a kernel at processing node 556, to generate thecorresponding tile 564. Similarly, individual padded tile 564 isconvolved with a kernel at processing node 566, to generate thecorresponding tile 524. The convolution operations at processing nodes556 and 566 have a padding of 1, and stride of 1.

For performing a tile-wise convolution operation at processing node 556,tiles at the border of the input tensor 502 (such as tile 504 a) have tobe treated differently from tiles that are surrounded by other tiles(such as 504 d). Tile 504 d shares pixels with its neighboring tiles onall four of its sides. In contrast, corner tile 504 a shares pixels withits neighboring tiles on two sides (e.g., on right and bottom sides)only. This results in a difference in the effective dimensions of thetiles 504 a, 504 d, required to compute intermediate results 564 a, and564 d, respectively. For example, the effective dimension tile 504 a is10×10, while that of tile 504 d is 12×12.

This kind of individual treatment of tiles as discussed with respect toFIG. 5, results in different tile dimensions for tiles within a tensor,thus complicating the machine execution of a convolution operation.

Image Padding, and then Overlapping Tiling

FIG. 6A illustrates zero padding of an input tensor, and subsequenttiling of the zero-padded input tensor. For example, FIG. 5 discussedherein earlier padded individual tiles of a tensor, and in contrast,FIG. 6A discusses padding tiles of a tensor, and then tiling the paddedtensor.

For example, in FIG. 6, an input tensor 602 is received. In anembodiment, the input tensor 602 is zero-padded. For example, padding604 is applied along a periphery of the input tensor 602, therebyincreasing a size of the input tensor 602 and generating a padded inputtensor 606.

In the example use case of FIG. 6A, the input tensor 602 has a 32×32dimension, and a padding 604 that comprises 2 lines of pixels is appliedto the input tensor 602. This generates the padded input tensor 606 thathas dimensions of 36×36. It may be noted that as the 2-pixel widepadding is added to both left and right sides of the input tensor 602,the padded input tensor 606 is 4 pixels wider than the input tensor 602.Similarly, as the 2-pixel high padding is added to both top and bottomsides of the input tensor 602, the padded input tensor 606 is 4 pixelshigher than the input tensor 602.

In FIG. 6A, the padding 604 comprises 2 lines of pixels added around theperiphery or edges of the input tensor 602. However, adding 2 lines ofpixels is merely an example, and any different number of lines of pixelscan be added in another example. A number of lines of pixels to bepadded to the input tensor 602 is based on, for example, a target sizeof the output tensor, a size of the input tensor, a number ofconvolution operations being performed by the network, and/or the like.In another example, the padding can be applied to one or more sides, butnot necessarily on all sides, of the input tensor. In an embodiment, thepadding logic 280 of FIG. 2 can be used to implement the padding of theinput tensor 602. In an embodiment, the padding 604 is zero-padding.Thus, pixels within the padding 604 have zero values.

Once the padded input tensor 606 is generated from the input tensor 602,the padded input tensor 606 is tiled, to generate a plurality of tiles614 a, 614 b, 614 c, 614 d. In the example of FIG. 6A, the tiles 614 areoverlapping tiles. Thus, two neighboring tiles have an overlappingregion, as discussed with respect to FIG. 4A herein previously. Althoughthe tiles are overlapping in the example use case of FIG. 6A, in anotherexample, the tiles of the padded input tensor 606 can be non-overlappingtiles.

The right-bottom corner of FIG. 6A also separately illustrates theindividual tiles 614 in an expanded view. For example, the zero-paddedpixels are along a top edge and left edge of the tile 614 a, thezero-padded pixels are along a top edge and right edge of the tile 614b, the zero-padded pixels are along a bottom edge and left edge of thetile 614 c, and the zero-padded pixels are along a bottom edge and rightedge of the tile 614 d. In the example of FIG. 6A, each tile 614 has an18×18 area of pixels that are from the input tensor 602, where thepixels within this 18×18 area can be zero or non-zero pixels (e.g.,depending on the pixel values of the input tensor 602). Each tile 614also has zero-pixels, which are a part of the padding 604, arrangedalong two edges of the tile, as illustrated.

Any two neighboring tiles in the padded input tensor 606 have anoverlapping area. For example, an overlapping area 605 between tiles 614a and 614 b has a dimension of 20×4. Similarly, an overlapping areabetween tiles 614 a and 614 c has a dimension of 4×20, and a centrallylocated overlapping area among all the tiles 614 a, . . . , 614 d has adimension of 4×4.

FIG. 6B illustrates tiling of a zero-padded input tensor 606 into aplurality of overlapping tiles 614 a, 614 b, 614 c, 614 d, andsubsequent two-stage convolution of the tiles. The 36×36 zero-paddedinput tensor 606 and the tiling of the zero-padded input tensor 606 havebeen discussed in detail with respect to FIG. 6A.

Each of the tiles 614 a, . . . , 614 d is convolved with a kernel duringa first convolution operation in a processing node 618, to generate acorresponding one of a plurality of tiles 624 a, . . . , 624 d,respectively, of an intermediate tensor 620. During the firstconvolution operation, no additional padding is applied to individualtiles. Thus, padding for the first convolution operation is set to zero,and each of the padding width P_(w) and padding height P_(h) is 0 forthe first convolution operation 618. A stride of 1 is assumed, e.g.,each of the strides S_(w) and S_(h) is assumed to be 1. The convolutionkernel for the first convolution operation at the processing node 618 isassumed to be 3×3. The input receptive field is individual tiles 614having a size of 20×20. Accordingly, referring to equations 1, 2 andFIG. 6B, for the first convolution operation at processing node 618, awidth of each tile 624 of the intermediate tensor 620 is given by(20−3+0)/1+1=18, and similarly a height of each tile 624 of theintermediate tensor 620 is also 18, as illustrated in FIG. 6B. Becauseall the tiles 614 a, . . . , 614 d have the same dimension, each oftiles 624 a, . . . , 624 d of the intermediate tensor 620 also have thesame dimension of 18×18.

Also illustrated in FIG. 6B is a second convolution operation at aprocessing node 640, in which a kernel is convolved with each tile 624of the intermediate tensor 620, to generate a corresponding tile 644 ofan output tensor 646. During the convolution 640, a padding of 0 is used(e.g., individual tiles 624 are not padded during the convolution).Also, a 3×3 kernel and a stride of 1 are used. Accordingly, referring toequations 1, 2 and FIG. 6B, a width of each tile 644 of the outputtensor 646 is given by (18−3+0)/1+1=16, and similarly a height of eachtile 644 of the output tensor 646 is also 16, as illustrated in FIG. 6B.Thus, individual 16×16 tiles 644 form the output tensor 646 of size32×32. There is no overlap among the tiles in the output tensor 646.

Thus, in FIGS. 6A and 6B, the padding logic 280 applies cumulative inputpadding 604 that confines the padding 604 to the input tensor 602, e.g.,along a periphery or edge of the input tensor 602. Accordingly, thecumulative input padding 604 pads the input tensor 602 into the paddedinput tensor 606. Subsequently, “post-padding tiling” is applied, wherethe padded input tensor 606 is tiled into multiple tiles 614 a, . . . ,614 d. The term “post-padding tiling” implies that the tiling isperformed after applying the padding to the input tensor 602. Thepost-padding tiling, thus, tiles the padded input tensor 606 into a setof pre-padded input tiles 614 a, . . . , 614 d. Thus, the pre-paddedinput tiles 614 a, . . . , 614 d are padded prior to the convolutionoperation at processing node 618, and each of the pre-padded input tiles614 a, . . . , 614 d have a same tile size (e.g., 20×20 size in theexample of FIG. 6B). The intermediate tensor 620 is again tiled into theset of intermediate tiles 624 a, 624 b, 624 c, 624 d with a same tilesize. The intermediate tiles 624 a, 624 b, 624 c, 624 d are furtherconvolved, to generate the final output tensor 646 havingnon-overlapping tiles 644 a, 644 b, 644 c, and 644 d, each having thesame tile size.

Furthermore, the padding increases an effective size of the tiles 614,thereby compensating for dimensionality reduction due to the convolutionprocess. For example, in FIGS. 6A and 6B, both the input tensor 602 andthe output tensor 646 are 32×32, e.g., of the same size. Typically, in atwo-stage convolution process, the tensor size is progressively orlinearly decreased (e.g., as seen in equations 1 and 2), depending onpadding, stride, and kernel size. However, padding the image increasesthe input tensor size prior to the convolution, to at least in partcompensate for dimensionality reduction during subsequent convolutionoperation(s).

FIG. 6C illustrates the padding and tiling of FIGS. 6A-6B, with one ormore lines of peripheral pixels of the intermediate tensor 620 beingforced to zero. The padding and convolution operations depicted in FIGS.6B and 6C are the same. The intermediate tensor 620 in these figureshave peripheral pixels (e.g., labelled as 623 in FIG. 6C and depictedusing cross-hatchings) that have contributions from the zero-paddedperipheral pixels 604 of the input tensor 602. For example, during thefirst convolution operation, the peripheral pixels 623 of theintermediate tensor 620 are generated based at least in part on thezero-padded pixels 604 of the input tensor 602. The peripheral pixels623 of the intermediate tensor 620 may or may not be zero, depending onthe peripheral pixels of the input tensor 602.

In an embodiment, non-zero peripheral pixels 623 of the intermediatetensor 620 are assigned zero pixel-values. That is, the non-zeroperipheral pixels 623 are forced to be zero. This way, contribution ofthe zero-padded pixels 604 during the first convolution operation isremoved from the intermediate tensor 620.

For example, assume a hypothetical scenario where the input tensor 602is convolved twice (e.g., using the convolution parameters of theconvolutions 618 and 640 of FIG. 6C), without tiling, to generate ahypothetical output tensor (e.g., assume that for such a hypotheticalscenario, sufficient memory and processing capabilities are available toprocess the entire tensor without tiling). On the other hand, in FIG.6C, the output tensor 646 is generated by zero-padding the input tensorusing padding 604, then tiling, and then convoluting the titles ofzero-padded image. To make the hypothetical output tensor and the outputtensor 646 equivalent or the same, the effect of the zero-padding 604has to be removed, which is done by assigning zero values to thenon-zero pixels 623. In an example, such zero-assignment to theperipheral pixels 623 makes the output tensor 646 mathematicallyequivalent to the above discussed hypothetical output tensor.

As illustrated in FIG. 6C, a zero-padding of two lines of pixels areapplied to the input tensor 602, to generate the padding 604. Also, theperipheral pixels 623 of the intermediate tensor 620 comprise a singleline of pixels along the periphery of the intermediate tensor 620. Thus,there is a dimensionality reduction, from a 2 pixel-width zero-paddedregion 604 to a single pixel-width region 623 that is being forced tozero, as illustrated in FIG. 6C.

In another example, if, for example, the width of the zero-padded region604 is higher (e.g., greater than 2, such as 4), then the width of theregion 623 that is being forced to zero may also be correspondinglyhigher (e.g., greater than 1). As an example, if the width of thezero-padded region 604 is 4, then the width of the region 623 that isbeing forced to zero may be 2 (or 3), based on the implementation.

Furthermore, FIG. 6C illustrates two convolution operations, andperipheral pixels of only one intermediate tensor (e.g., output of thefirst convolution) is forced to zero. However, in another example,multiple (e.g., greater than 2) sequential convolution stages may bepresent and the zero-padding region 604 can have a width that is greaterthan 2 (e.g., 4, 6, 8, or even higher). Assume, for the sake ofdiscussion, that the width of the zero-padding region 604 is 4. In suchan example, outputs of a first convolution layer can have 2 lines ofpixels that are being forced to zero, and output of a subsequent secondconvolution layer can have 1 line of pixels that are being forced tozero. Note that the widths discussed herein are merely examples, and arenot intended to limit the scope of this disclosure.

In an embodiment, when a tensor is zero-padded and/or tiled, asdiscussed herein with respect to FIGS. 6A-7B, corresponding tilingmetadata is generated. For example, a tiling metadata is associated witha corresponding pair of tensor and processing node. For example,referring to FIG. 6C, a tiling metadata describing the tiling of theintermediate tensor 620 would be associated with (i) the intermediatetensor 620 and (ii) the processing node or layer 618 of the neuralnetwork generating the intermediate tensor 620. Thus, individual(tensor, processing node) pairs would have corresponding tilingmetadata.

FIG. 7A illustrates padding an input tensor 702 to form a padded inputtensor 706, where the padded input tensor 706 is tiled in a plurality oftiles 710 a, . . . , 710 i. For example, in the examples of FIG. 6C, theinput tensor was padded and subsequently tiled in four partiallyoverlapping tiles. In the example of FIG. 7A, the input tensor 702 ispadded with a padding frame 704, to generate the padded input tensor706, which is then tiled into a plurality number of tiles, such as 16tiles in the example of FIG. 7A. Thus, the padded input tensor 706 istiled into a higher number of tiles in FIG. 7A, compared to the examplefour tiles in FIG. 6C.

In FIG. 7A, the padded input tensor 706 has a cumulative padding frame704 (also referred to herein as cumulative input padding) along aperiphery, where the padding frame 704 includes one or more lines ofzero-valued pixels along the periphery of the padded input tensor 706.As discussed, in an embodiment, the padding logic 280 pads the inputtensor 702 with the padding frame 704, to generate the padded inputtensor 706. Because the padding frame 704 has been applied to the paddedinput tensor 706, the padded input tensor 706 is also referred aspre-padded input.

In an embodiment, the tiling logic 282 tiles the padded input tensor 706into a plurality of tiles 710. The tiling here is performed afterapplying the padding frame—hence, the tiling is also referred to hereinas “post-padding tiling.”

The tiles 710 in the padded input tensor 706 are labelled based on alocation of each tile relative to the padding frame 704. For example, asingle top-left tile is labelled as 710 a, and sections of the paddingframe 704 are disposed on a top edge and a left edge of the tile 710 a.Two top tiles are labelled as 710 b, and each tile 710 b has acorresponding section of the padding frame 704 disposed on a top edge ofthe corresponding tile 710 b. Similarly, a single top-right tile islabelled as 710 c, and corresponding sections of the padding frame 710are disposed on top and right edges of the tile 710 c. Two left tilesare labelled as 710 d, and each tile 710 d has a corresponding sectionof the padding frame 704 disposed on a left edge of the correspondingtile 710 d. Two right tiles are labelled as 710 f, and each tile 710 fhas a corresponding section of the padding frame 704 disposed on a rightedge of the corresponding tile 710 f A single bottom-left tile islabelled as 710 g, and sections of the padding frame 704 are disposed ona bottom edge and a left edge of the tile 710 g. There are two bottomtiles 710 h with a single section of the padding frame 704 disposed onthe bottom edge of each tile 710 h. A single bottom-right tile islabelled as 710 i, and sections of the padding frame 704 are disposed ona bottom edge and a right edge of the tile 710 i.

Thus, individual ones of the tiles 710 a, 710 b, 710 c, 710 d, 710 f,710 g, 710 h, and 710 i has corresponding sections of the padding framedisposed on one or more edges of the corresponding tiles. For example,individual ones of the tiles 710 a, 710 b, 710 c, 710 d, 710 f, 710 g,710 h, and 710 i has corresponding sections of the padding framedisposed on (left or right breadth) and/or (top or bottom length) of thecorresponding tile. As these tiles are at least partially padded, thesetiles are also referred to herein as partially padded input tiles.

The padded input tensor 706 also includes multiple (e.g., four in theexample of FIG. 7A) middle tiles, which are labelled as tiles 710 e, andsections of the padding frame 704 are not disposed on any section of thetiles 710 e. For example, each middle tile 710 e is completelysurrounded by other tiles, and hence, the padding frame 704 is notdisposed on any section of the middle tiles 710 e. Thus, these tiles areunpadded input tiles.

In an embodiment, each of the tiles 710 a, . . . , 710 i has the samesize (e.g., same length and breadth), as discussed with respect to FIGS.6A-6C. Neighboring tiles overlap with each other. In FIG. 7A, tileboundary of four example tiles 710 a, 710 b, 710 d, 710 e areillustrated. As seen, the boundaries of these tiles overlap, asdiscussed with respect to FIGS. 6A-6C.

Individual ones of the tiles 710 a, . . . , 710 i of the padded inputtensor 706 is convolved by a processing node 708, to generatecorresponding tiles 714 a, . . . , 714 i, respectively, of anintermediate tensor 712. For example, pre-padded input tile 710 a isconvolved to generate a corresponding tile 714 a of the intermediatetensor 712, each of the two pre-padded input tiles 710 b is convolved togenerate a corresponding one of the two tiles 714 b of the intermediatetensor 712, and so on. During the convolution 708, a 3×3 kernel, astride of 1, and a padding of 0 is used. As a padding of 0 is used, theinput tiles 710 are not further padded during the convolution operationat the processing node 708.

The intermediate tensor 712 has peripheral pixels 723 (depicted usingcross-hatchings) that have contributions from the zero-valued paddingframe 704 of the padded input tensor 706. Accordingly, similar to FIG.6C, in FIG. 7A, the peripheral pixels 723 in FIG. 7A are assigned zeropixel-values. That is, the non-zero peripheral pixels 723 of theintermediate tensor 712 are forced to be zero.

Note that the peripheral pixels 723, which are forced to zero, are alongone or more sides of only some tiles, and not all tiles, of theintermediate tensor 712. For example, tiles that are on periphery of theintermediate tensor 712 are referred to as peripheral tiles, and tilesthat are completely surrounded by other tiles are referred to as centraltiles. The peripheral pixels 723 (which are forced to zero) are alongtop and left edges of the top-left peripheral tile 714 a, along topedges of the top peripheral tiles 714 b, along top and right edges ofthe top-right peripheral tile 714 c, along left edges of the leftperipheral tiles 714 d, along right edges of the right peripheral tiles714 f, along bottom and left edges of the bottom-left peripheral tile714 g, along bottom edges of the bottom peripheral tile 714 h, and alongbottom and right edges of the bottom-right peripheral tile 714 i, asillustrated. The middle or central tiles 714 e do not have theperipheral pixels 723 disposed thereon, as the central tiles 714 e arecompletely surrounded by other peripheral tiles in the intermediatetensor 712.

In an embodiment, each of the tiles 714 a, . . . , 714 i has the samesize (e.g., same length and breadth), as discussed with respect to FIGS.6A-6C. Neighboring tiles overlap with each other. In FIG. 7A, tileboundary of four example tiles 714 a, 714 b, 714 d, 714 e areillustrated. As seen, the boundaries of these tiles overlap, asdiscussed with respect to FIGS. 6A-6C. The previously discussed colorcoding (e.g., red, green, blue, and orange) are used for the boundary ofthe four example tiles 714 a, 714 b, 714 d, 714 e.

Individual tiles 714 of the intermediate tensor 712 are convolved in theprocessing node 716, to generate corresponding tiles a, . . . , i of theoutput tensor 720. For example, tile 714 a is convolved to generate acorresponding tile “a” of the output tensor 720, each of the two tiles714 b is convolved to generate a corresponding one of the two tiles “b”of the output tensor 720, and so on. During the convolution 716, a 3×3kernel, a stride of 1, and a padding of 0 is used (e.g., the tiles 714are not further padded during the convolution operation 716). In anexample, the tiles a, . . . , i in the output tensor 720 arenon-overlapping and of the same size, as discussed with respect to FIG.6C.

The padding and subsequent tiling of an input tensor, and then forcingperipheral pixels of an intermediate tensor to become zero, as discussedwith respect to FIGS. 6C and 7A, can be applied to both a forward pathand a back-propagation path of a neural network, such as a CNN. FIG. 7Billustrates forcing peripheral pixels of intermediate tensors of bothforward and back-propagation path of a neural network to zero. Forexample, the forward path illustrated in FIG. 7B includes the inputtensor 702 with padding frame 704, as also discussed with respect toFIG. 7A. In FIG. 7B, merely a single tile of each tensor is illustrated.Accordingly, the padded tile 710 a of the padded input tensor 706 isillustrated in FIG. 7B. As also discussed with respect to FIG. 7A, thepadded tile 710 a is convolved by a processing node 708, to generate anintermediate tile 714 a of the intermediate tensor 712, where peripheralpixels 723 of the intermediate tile 714 a are forced to zero.Subsequently, the intermediate tile 714 a of the intermediate tensor 712is further convolved by a processing node 716, to generate an outputtile “a” of the output tensor 720. The tensors 706, 712, and 720 aregenerated in a forward path of the neural network.

In the back-propagation path of the neural network, an intermediatetensor 762 is generated via a back-convolution or transpose convolutionin a processing node 766. The intermediate tensor 762 is representativeof error gradient, as will be discussed herein. Although notillustrated, the intermediate tensor 762 is generated from an inputtensor (e.g., which may or may not be zero-padded). The intermediatetensor 762 comprises peripheral pixels 763, which are forced to zero bythe padding logic 280. In FIG. 7B, an example tile 764 a is illustrated,which comprises peripheral pixels 763 (that are forced to zero) alongtwo edges of the tile. An output tensor 770 is also generated in theback-propagation path. For example, based on convolution of tile 764 ain the processing node 768, a corresponding tile a′ of the output tensor770 is generated.

Materialization of Tiles

Materialization of information, as used herein, is referred to a processof storing the information in an external memory. For example, referringto FIGS. 2 and 6C, the array of units 190 includes processors and localmemory 128. The convolution operations discussed with respect to FIG. 6Care performed by the processors of the array 190, and intermediateresults of a convolution operation are stored internally in the localmemory units 128 within the array 190. The final product of theconvolution operation, which is a tensor, is then stored in the memory140 that is external to the data processor 110. Points in a data flowgraph, where a tensor is materialized and stored in the memory 140, isalso referred to as a checkpoint. Thus, at a checkpoint, a correspondingtensor is materialized and stored in the memory 140. For example,referring to FIG. 6C, the intermediate tensor 620 and the output tensor646 are materialized and stored in the memory 140, while theintermediate products of the convolution operations at processing nodes618 and 640 are stored internally in the local memory units 128 withinthe array 190.

FIGS. 8A and 8B respectively illustrate materialization of a firstexample tensor 820 and a second example tensor 810, where during thematerialization, the two example tensors are stored in the memory 140that is external to the data processor 110. Specifically, FIGS. 8A, 8Billustrate example formats in which the example tensors are stored inthe memory 140.

Referring to FIG. 8A, illustrated is a tensor 820, which, for example,corresponds to the intermediate tensor 620 of FIG. 6C. In the examplewhere the tensor 820 of FIG. 8A corresponds to the intermediate tensor620 of FIG. 6C, the tensor 820 has peripheral pixels (such as peripheralpixels 623 of FIG. 6C) that are forced to zero, although such peripheralpixels are not illustrated in FIG. 8A for purposes of illustrativeclarity.

A left section of FIG. 8A illustrates actual dimensions andconfiguration of the tensor 820. A middle section of FIG. 8A illustratesdimensions and configuration of the tensor 820, when the tensor 820 isstored in the memory 140. A right section of FIG. 8A illustratesnotations used for the tensor 820, where the notations provideinformation regarding various dimensions and configuration of the tensor820.

For example, referring to the left section of FIG. 8A, the tensor 820 isa 34×34 tensor having four 18×18 overlapping tiles 834 a, 834 b, 834 c,834 d. Thus, any two neighboring tiles in the tensor 820 have an overlapregion, such as the overlap region 835 between the tiles 834 a and 834b. A size of the overlap region 835 is 18×2. Thus, the overlap region835 between the tiles 834 a and 834 b has a width of 2. Similarly, anoverlap region between the tiles 834 a and 834 c has a height of 2. Forpurposes of ease of discussion, the tiles 834 of the tensor 820 areassumed to have an overlap of 2×2 (i.e., a height or a width of anoverlap region is at least 2).

Now referring to the middle section of FIG. 8A, illustrated is a mannerin which the tensor 820 is stored in the memory 140. For example,individual tiles 834 of the tensor 820 are materialized and stored inthe memory 140 in a non-overlapping manner. Thus, for example, theoverlap region 835 between the tiles 834 a and 834 b is storedtwice—once as a part of the tile 834 a, and once more as a part of thetile 834 b. Thus, the middle section of FIG. 8A illustrates twoinstances of the overlap region 835 being stored in the memory 140.Thus, the overlap region 835 is “redundantly” stored or localized in thememory 140.

Because the overlapping 18×18 tiles 834 a, . . . , 834 d of the 34×34tensor 820 are stored in a non-overlapping manner in the memory 140, thetensor 820 occupies 36×36 storage space in the memory 140, e.g., 18×18space for each tile 834. Thus, although the dimension of the actualtensor 820 is 34×34, the tensor 820 occupies a larger storage space inthe memory 140. This marginal increase in storage space in the memory140 is well compensated by an increase in performance and speed of theoverall system, however. For example, materializing and storing tiles ofa tensor individually (e.g., in a non-overlapping manner) in the memory140, rather than storing a corresponding tensor with the overlappingtiles, results in faster fetching of individual tiles form the memoryduring subsequent operations of the tiles. Thus, when the array 190needs to operate on the individual tiles 834 a, 834 b, 834 c, 834 d, thearray 190 can immediately fetch these tiles from the memory. If,however, the tensor 820 was stored with overlapping tiles in the memory140 instead, the memory 140 (or a processing component) had to calculateor keep in account the overlapping region 835, when fetching the tiles834 a and 834 a, possibly resulting in latency or delay in the tilefetch operation. Thus, materializing and storing individual tiles in thememory 140 in a non-overlapping manner, instead of storing thecorresponding tensor with the overlapping tiles, results in fasterfetching of individual tiles from the memory.

The right side of FIG. 8A illustrates a notation which describes themanner in which the tensor 820 is materialized. The notation includesseveral sizes, each size followed by a corresponding alphabet inparenthesis. For example, the notation corresponding to the tensor 820includes a size 34×34(F), where “(F)” indicates that the tensor 820 hasan actual or full size of 34×34 (as discussed with respect to the leftsection of FIG. 8A). The notation corresponding to the tensor 820further includes a size 18×18(T), where “(T)” indicates that the tensor820 has tiles of size 18×18 (as discussed with respect to the left andmiddle sections of FIG. 8A). The notation corresponding to the tensor820 further includes a size 36×36(M), where “(M)” indicates that thetensor 820 has a size of 36×36, when stored as non-overlapping tiles inthe memory 140, as discussed with respect to the middle section of FIG.8A.

Referring now to FIG. 8B, illustrated is a tensor 810, which, forexample, corresponds to the padded and tiled input tensor 610 of FIG.6C. In the example where the tensor 810 of FIG. 8B corresponds to thepadded and tiled input tensor 610 of FIG. 6C, the tensor 810 haszero-padded pixels along edges of individual tiles, although suchzero-padded pixels are not illustrated in FIG. 8B for purposes ofillustrative clarity.

Similar to FIG. 8A, a left section of FIG. 8B illustrates actualdimensions and configuration of the tensor 810. A middle section of FIG.8B illustrates dimensions and configuration of the tensor 810, when thetensor 810 is stored in the memory 140. A right section of FIG. 8Billustrates notations used for the tensor 810, where the notationsprovide information regarding various dimensions and configuration ofthe tensor 810.

For example, referring to the left section of FIG. 8B, the tensor 810 isa 36×36 tensor having four 20×20 overlapping tiles 830 a, 830 b, 830 c,830 d. Thus, any two neighboring tiles in the tensor 810 have an overlapregion, such as the overlap region 831 between the tiles 834 a and 834b. A size of the overlap region 831 is 20×4. Thus, the overlap region831 between the tiles 830 a and 830 b has a width of 4. Similarly, anoverlap region between the tiles 830 a and 830 c has a height of 4. Forpurposes of ease of discussion, the tiles 830 of the tensor 810 areassumed to have an overlap of 4×4 (i.e., at least a height or a width ofan overlap region is 4).

Now referring to the middle section of FIG. 8B, illustrated is a mannerin which the tensor 810 is stored in the memory 140. For example, unlikethe tiles 834 of the tensor 820 of FIG. 8A, in FIG. 8B individual tiles830 of the tensor 810 are materialized and stored in the memory 140 inan overlapping manner. Thus, for example, the overlap region 831 betweenthe tiles 830 a and 830 b is stored merely once in the memory 140.

Thus, the left section of FIG. 8B and the middle section of FIG. 8B havesame dimensions and configuration. For example, because the overlapping20×20 tiles 830 a, . . . , 830 d of the 36×36 tensor 810 are stored inthe overlapping manner in the memory 140, the tensor 810 occupies 36×36storage space in the memory 140. The reasons for storing the tiles 834of the tensor 820 of FIG. 8A in a non-overlapping manner in the memory140, while storing the tiles 830 of the tensor 810 of FIG. 8B in anoverlapping manner in the memory 140, will be discussed herein infurther detail in turn.

The right section of FIG. 8B illustrates a notation which describes themanner in which the tensor 810 is materialized. For example, thenotation corresponding to the tensor 810 includes a size 36×36(F), where“(F)” indicates that the tensor 810 has an actual or full size of 36×36(as discussed with respect to the left section of FIG. 8B). The notationcorresponding to the tensor 810 further includes a size 20×20(T), whichindicates that the tensor 810 has tiles of size 20×20. The notationcorresponding to the tensor 810 further includes a size 36×36(M), whichindicates that the tensor 810 has a size of 36×36 when stored in thememory 140, as discussed with respect to the middle section of FIG. 8B.The size indicated by notation (M) (e.g., which indicates the size of atensor, when the tensor is stored in the memory 140) is also referred toherein as a region size.

The notation corresponding to the tensor 810 further includes a size4×4(MO), where “MO” indicates a size of overlap among the tiles, whenthe tiles are stored in the memory 140. For the tensor 810, this “MO”size is 4×4, as indicated in FIG. 8B. It may be noted that in contrastto FIG. 8B, the tiles 834 of the tensor 820 of FIG. 8A are stored in anon-overlapping manner in the memory 140—hence, the “MO” size for thetensor 820 of FIG. 8A is 0×0, and hence, the right section of FIG. 8Adoes not include such a “MO” size. A presence of a non-zero “MO” size ina notation of a tensor indicates that the tiles of the tensor are storedin an overlapping manner in the memory 140, where the “MO” provides anindication of the overlap in the tiles stored in the memory 140.

Sectioning of Graph

The system 100 of FIG. 1 receives a processing graph of an application,where the processing graph comprises one or more sections. Theprocessing graph is used to implement a neural network, such as a CNN, aFCNN, an RNN, a LSTM network, an autoencoder, a deep belief network, aGAN, and/or the like. FIG. 9A illustrates one example section 900 of aprocessing graph comprising processing nodes 908, 912 implementingconvolution operations, and processing node 916 implementing max-poolingoperation. The section 900 of the processing graph comprises a sequenceof processing nodes or layers. Individual processing nodes or layersperform a corresponding operation. For example, the layers in thesequence of layers include one or more of convolution layers, maxpooling layers, min pooling layers, average pooling layers,non-linearity layers, normalization layers, dropout layers,concatenation layers, transpose convolution layers, fully connectedlayers, softmax layers, and/or loss layers. The example section 900 ofFIG. 9A includes two example types of layers, such as convolution layersand a max-pool layer. The terms “layer” implementing an operation and“processing node” implementing an operation are used interchangeably.

For example, the sequence of processing nodes includes an inputprocessing node 908 configured to receive an input tensor 902. The inputtensor 902 is labelled with notations that are discussed with respect toFIGS. 8A and 8B herein. In the example use case of FIG. 9A, the inputtensor 902 is similar to the tensor 810 of FIG. 8B and is labeledsimilar to the tensor 810 of FIG. 8B. For example, as illustrated inFIG. 9A, the input tensor 902 has a size 36×36(F), where “(F)” indicatesthat the tensor 902 has an actual or full size of 36×36 (as discussedwith respect to the left section of FIG. 8B). The tensor 902 comprisesmultiple tiles, each having a size of 20×20, as indicated by thenotation (T) within the tensor 902 in FIG. 9A. The tensor 902 furtherincludes a size 36×36(M), which indicates that the tensor 902 has a sizeof 36×36 when stored in the memory 140. For the tensor 902, the “MO”size is 4×4, implying that neighboring tiles of the tensor 140 stored inthe memory 140 has a 4×4 overlap. Although not illustrated, the inputtensor 902 is padded and then tiled, as discussed with respect to FIGS.6A-6C herein previously.

The input processing node 908 of the section 900 convolves the inputtensor 902 with a kernel (not illustrated), to generate an intermediatetensor 910. In the example use case of FIG. 9A, the intermediate tensor910 is similar to the tensor 820 of FIG. 8A and is labeled similar tothe tensor 820 of FIG. 8A. For example, as illustrated in FIG. 9A, thetensor 910 has a size 34×34(F), where “(F)” indicates that the tensor910 has an actual or full size of 34×34 (as discussed with respect tothe left section of FIG. 8A). The tensor 910 comprises multiple tiles,each of which is generated from a corresponding tile of the tensor 902.Each tile of the tensor 910 has a size of 18×18, as indicated by thenotation (T) within the tensor 910 in FIG. 9A. The tensor 910 furtherincludes a size 36×36(M), which indicates that the tensor 910 has a sizeof 36×36 when stored in the memory 140. Thus, the tiles of the tensor910 are materialized and stored in a non-overlapping manner, as alsodiscussed with respect to FIG. 8A. Although not illustrated in FIG. 9A,peripheral pixels of the tensor 910 are forced to zero, as discussedwith respect to FIG. 6C herein previously.

An intermediate processing node 912 of the section 900 convolves theintermediate tensor 910 with another kernel (not illustrated), togenerate another intermediate tensor 914. In the example use case ofFIG. 9A, the intermediate tensor 914 is similar to the tensor 646 ofFIG. 6C. For example, as illustrated in FIG. 9A, the tensor 914 has asize 32×32(F), where “(F)” indicates that the tensor 914 has an actualor full size of 32×32. The tensor 914 comprises multiple tiles, each ofwhich is generated from a corresponding tile of the tensor 910. Eachtile of the tensor 914 has a size of 16×16, as indicated by the notation(T) within the tensor 914 in FIG. 9A. The tensor 910 further includes asize 32×32(M), which indicates that the tensor 914 has a size of 32×32when materialized and stored in the memory 140. It may be noted that thetile size is 16×16, and the actual tensor size is 32×32. Accordingly,the tiles are non-overlapping in the tensor 914 (e.g., as seen in thetensor 646 of FIG. 6C), and stored in such a non-overlapping manner inthe memory 140. Accordingly, the “MO” size is zero for the tensor 914,as illustrated in FIG. 9A.

An output processing node 916 of the section 900 performs a poolingoperation (such as a max-pooling operation) on the intermediate tensor914, to generate an output tensor 920 and an index tensor 922. Forexample, the output processing node 916 performs the max-poolingoperation, by implementing a sample-based discretization process. Theobjective is to down-sample a representation of the tensor 914, byreducing its dimensionality. For example, the tensor 914 is divided intomultiple groups, each group comprising corresponding four adjacentpixels (e.g., 2×2 pixels in each group), and a maximum pixel value of apixel group is selected and output as a corresponding pixel in thetensor 920. The index label 922 provides an indication or location of aselected pixel within each group of 2×2 pixels. For example, assume a2×2 pixel group having four pixels having example pixel locations (1,1),(1,2), (2,1), and (2,2). Assume that the pixel (2,2) has a maximum pixelvalue among these four pixels. Then the output tensor 920 will includethe pixel value of the pixel (2,2), and the index tensor 922 willprovide a location information of the pixel relative to other pixels inthe group. For example, the index tensor 922 will include the pixellocation (2,2), to indicate the pixel value of this pixel among the 2×2pixel group is included in the output tensor 920.

In the example use case of FIG. 9A, each of the output tensor 920 andthe index tensor has a size 16×16(F), where “(F)” indicates that thesetensors have an actual or full size of 16×16. Each of the tensors 920and 922 comprises multiple tiles, each of which is generated from acorresponding tile of the tensor 914. Each tile of each of these tensors920, 922 has a size of 8×8, as indicated by the notation (T) withinthese tensors. Each of these tensors 920, 922 further includes a size16×16(M), which indicates that each of these tensors has a size of 16×16when materialized and stored in the memory 140. It may be noted that thetile size is 8×8, and the actual tensor size is 16×16. Accordingly, thetiles are non-overlapping in the image (e.g., as seen in the tensor 646of FIG. 6C), and stored in such a non-overlapping manner in the memory140. Accordingly, the “MO” size is zero for these tensors.

It may be noted that the example section 900 of the processing graphillustrated in FIG. 9A is merely an example, and is not intended tolimit the scope of this disclosure. For example, although the section900 is illustrated to include three processing nodes, in anotherexample, the section 900 can include a greater (or smaller) number ofprocessing nodes. For example, the section 900 can include a highernumber of convolution layers. Furthermore, although only convolution andmax-pooling layers are illustrated in the section 900 of the processinggraph, other types of layers may also be included, such as layersimplementing ReLU, average pooling, fully connected layers, and/or thelike. Also, the dimensions of various tensors illustrated in FIG. 9A areelsewhere herein are mere examples, and are not intended to limit thescope of this disclosure.

FIG. 9A illustrated a single section of a processing graph of anapplication. However, a processing graph of an application can includemultiple such sections. For example, FIG. 9B illustrates a processinggraph that comprises two forward path sections 900 and 930. Theprocessing graph is used to implement a neural network, such as a CNN, aFCNN, an RNN, a LSTM network, an autoencoder, a deep belief network, aGAN, and/or the like. Each of the sections 900, 930 comprises a sequenceof processing nodes or layers, such as convolution layers andmax-pooling layers, as discussed with respect to FIG. 9A. In an example,the runtime logic may configure one or more reconfigurable processors(such as PCUs, FIG. 14A) to a corresponding section 900 or 930. Thus,first one or more reconfigurable processors may execute the section 900,and second one or more reconfigurable processors may execute the section930.

The section 900 of FIG. 9B has been discussed with respect to FIG. 9A.Section 930 of FIG. 9B has layers that are at least in part similar tothe corresponding layers of section 900. For example, section 930comprises a plurality of processing nodes 934, 938, 942, which includesan input processing node 934 configured to receive an input tensor 932,and convolve the input tensor 932 to generate an intermediate tensor936. An intermediate processing node 938 is configured to receive theintermediate tensor 936, and convolve the intermediate tensor 936 togenerate another intermediate tensor 940. An output processing node 942is configured to perform a max-pooling operation of the intermediatetensor 940, to generate an output tensor 944 and an index tensor 946, asdiscussed with respect to FIG. 9A. The dimensions of tensors 932, 936,940, 944, and 946 are illustrated in FIG. 9B, and these dimensions willbe apparent based on the discussion of tensor dimensions with respect toFIG. 9A.

As illustrated in FIG. 9B, the section 900 outputs a set ofnon-overlapping output tiles of the output tensor 920, where the outputtensor 920 has an actual dimension of 16×16, has tile size of 8×8, and adimension of 16×16 when materialized and stored in the memory 140 (withno tile overlap when stored in the memory 140). Thus, the tiles of theoutput tensor 920 are in a target tiling configuration of the section900. In contrast, the input tensor 932 of the section 930 has an actualdimension of 20×20, has tile size of 12×12, and a dimension of 20×20when stored in the memory 140 (with a 4×4 tile overlap, when stored inthe memory 140). Thus, the tiles of the input tensor 932 are in an inputtiling configuration of the section 930.

As illustrated, the target tiling configuration of the output tensor 920of the section 900 is different from the input tiling configuration ofinput tensor 932 of the section 930. Thus, the output tensor 920 of thesection 900 undergoes some type of transformation, which results in thechange in dimensionality and the generation of the input tensor 932 fromthe output tensor 920. As will be discussed with respect to FIG. 9C, theoutput tensor 920 of the section 900 is padded and re-tiled, to generatethe input tensor 932 of the section 930.

FIG. 9C illustrates transformation of an output tensor of a firstsection of a processing graph, to generate an input tensor of asucceeding second section of the processing graph, wherein thetransformation includes zero-padding the output tensor and re-tiling thezero-padded tile.

As illustrated in FIG. 9C, the output processing node 916 of the section900 implements the max-pooling 916, and generates individual tiles 924a, 924 b, 924 c, and 924 d of the output tensor 920. For example, theoutput processing node of the section 900 processes individual tiles ofthe intermediate tensor 914, to individually generate the tiles 924 ofthe output tensor 920. Put differently, the output processing node ofthe section 900 does not directly generate the output tensor 920—rather,the output processing node of the section 900 generates the tiles 924,which, in combination, define the output tensor 920.

In an embodiment, the data flow logic 286 (illustrated in FIG. 2)materializes the tiles 924, e.g., stores the tiles 924 to the memory140, as illustrated in FIG. 9C. For example, the tiles 924 aretransmitted to the memory 140 via the external I/O interface 150 and theline 145 (illustrated in FIG. 2).

In an embodiment, the data flow logic 286 causes transmission of thetiles 924 a, . . . , 924 d individually and independently to the memory140 from the array 190, as and when the tiles are generated. Forexample, once the array 190 generates the tile 924 a, the data flowlogic 286 causes transmission of the tile 924 a from the array 190 tothe memory 140; once the array 190 generates the tile 924 b, the dataflow logic 286 causes transmission of the tile 924 b from the array 190to the memory 140, and so on. The tiles may be generated in parallel inthe array 190 and written to the memory 140 in parallel.

In another embodiment, the data flow logic 286 causes transmission ofthe tiles 924 a, . . . , 924 d collectively to the memory 140 from thearray 190. For example, the data flow logic 286 waits until all thetiles 924 a, 924 ab, 924 c, 924 d are generated. Once all the tiles 924a, 924 ab, 924 c, 924 d are generated, the data flow logic 286 causestransmission of the tiles 924 a, . . . 924 d collectively or in a batchto the memory 140 from the array 190.

Irrespective of how the tiles are transferred from the array 190 to thememory 140, in an example, once the reconfigurable processors 124 of thearray 190 generate a tile, the data flow logic 286 stores (or causes tostore) the tile from the reconfigurable processors 124 to one or morelocal memory units 128, and then transfers (or causes to transfer) thetile from the on-chip local memory units 128 to the off-chip memory 140.

In an embodiment, the data flow logic 286 logically stores the tiles 924a, . . . , 924 d together, as aggregate or composite tiles (orconcatenated tiles), to form the tensor 920. For example, the tiles 924a, . . . , 924 d are arranged in correct logical order (e.g., tile 924 abeing on top left, tile 924 being on the top right, and so on, asillustrated in FIG. 9C). Arranging the tiles in such an orderfacilitates correct aggregation of the tiles.

Before the tiles 924 a, . . . , 924 d are written to the memory 140, a20×20 space 921 in the memory 140 is initialized to zero, and reservedfor or allocated to the tensor 920, as illustrated in top-left corner ofFIG. 9C. When the 8×8 tiles 924 a, . . . , 924 d of the tensor 920 arewritten in the 20×20 space 921 allocated to the tensor 920, the 8×8tiles 924 a, . . . , 924 d occupy a central 16×16 region of this 20×20space 921. Put differently, the 8×8 tiles 924 a, . . . , 924 d of thetensor 920 are written or aggregated (or composed) in a central 16×16section of the 20×20 space reserved for the tensor 920, such that aborder or padding 925 of width 2 of the original 20×20 space is aroundthe tiles 924 a, . . . , 924 d. That is, no section of the tiles 924 a,. . . , 924 d is written in this border or padding 925 of width 2 of theoriginal 20×20 space. This padding 925 of width 2, which is now around aperiphery of the tensor 920 comprising the tiles 924 a, . . . , 924 d,forms a zero-padding for the tensor 920, as discussed with respect toFIG. 6C. Thus, the tensor 920 comprising the tiles 924 a, . . . , 924 dis now zero-padded with the padding 925. For example, the runtime logic110 comprises padding logic 280, which facilitates generation of thepadding 925 along the edges of the tensor 920, by appropriately writingthe tiles 924 in correct positions within the space 921. Thus, inessence, the padding logic 280 applies cumulative input padding 925 thatconfines the padding 925 to the tensor 920 along a periphery or edge ofthe input tensor 920, where the tensor 920 will eventually become theinput tensor 932 of the section 930. Applying a padding of width 2 alongall edges increases a size of the tensor 920 from 16×16 to 20×20.

Subsequently, post-padding tiling is applied, where the padded tensor920 is re-tiled into multiple tiles 933 a, 933 b, 933 c, 933 d. The term“post-padding tiling” implies that the tiling is performed afterapplying the padding to the output tensor 920. The post-padding tiling,thus, tiles the padded tensor 920 into a set of pre-padded input tiles933 a, . . . , 933 d of the input tensor 932.

Thus, the output tensor 920 from the section 900 is padded, and thenre-tiled, to generate the input tensor 932 of the section 930. Asillustrated, the tiles 933 of the tensor 932 has a size of 12×12, whilethe padded and tiled input tensor 932 has a size of 20×20. Thus, thereis a 4×4 overlap of the tiles 933, when the tiles 933 are stored in thememory. Thus, the “MO” size of the tensor 932 is 4×4, as illustrated inFIG. 9C.

The padding and re-tiling performed on the output tensor 920, totransform the output tensor 920 to the input tensor 932, may be carriedout by the host 120 and/or the reconfigurable processors 124. Forexample, the padding logic 280 and the tiling logic 282 can be executedby the host 120 and/or the reconfigurable processors 124, as discussedwith respect to FIG. 2.

Although FIG. 9C illustrates merely two sections 900 and 930, theprocessing graph can have more than two sections, based on theimplementation. A “section boundary” refers to a boundary between twoadjacent sections of the graph, such as between sections 900 and 930.Thus, at a section boundary, the processing graph has a cut orpartition, which partitions the processing graph into two subgraphs. Atotal number of subgraphs included in a processing graph depends on thenumber of such section cuts or section boundaries. For example, thesingle section cut in FIG. 9C partitions the processing graph into twosubgraphs or sections 900 and 930.

The processing graph has a plurality of layers, and accordingly, eachsubgraph or section has corresponding layers, which are also referred toas processing nodes. For example, as discussed previously, the section900 has layers depicted by labels 908, 912, and 916, and the section 930has layers depicted by labels 934, 938, and 942. Individual layersperform corresponding one of various types of operations, such asreduction operation (e.g., convolution, pooling, etc.). For example, alayer (such as the layer 908) can perform a convolution, which in anexample can be a strided convolution. In another example, a layer (suchas the layer 916) can perform a pooling operation, which in an examplecan be a max-pooling (as illustrated in FIG. 9C) or an average pooling(although not illustrated in FIG. 9C).

At the section cut depicted in FIG. 9C, the output processing node 920of the section 900 performs the max-pool operation 916, to generate theoutput tensor 920. As discussed previously, the output processing nodeor layer of the section 900 generates a set of tiles 924 a, . . . , 924d on a tile-by-tile basis. As also discussed previously, the data flowlogic 286 logically stores the tiles 924 a, . . . , 924 d together, asaggregate or composite tiles, to form the tensor 920 within theallocated memory space 921. The input processing node 932 of the nextsection 930, however, does not operate on the individual tiles 924 a, .. . , 924 d. Rather, the data flow logic 286, the padding logic 280, andthe tiling logic 282 aggregate these tiles 924 of the output tensor 920,pads the aggregation of the tiles 924 using the padding 925, tiles thepadded aggregation of the tiles 924, and then re-tiles the paddedaggregate to generate overlapping tiles 933 a, . . . , 933 d of theinput tensor 932. For example, now the input tensor 932 has an overlapregion 905 between tiles 933 a and 933 b, and similar overlap regionsbetween any two neighboring tiles. The input processing node 934 of thenext section 930 operates on the input tensor 932, which is generated bypadding and then re-tiling the aggregation of the set of output tiles924 a, . . . , 924 d of the output tensor 920 of the preceding section.In an example, a batch normalization operation is performed (notillustrated in the figure), where the input tensor 932 is appropriatelyconfigured to be processed by the section 930.

Thus, in FIG. 9C, the compiler 216 is configured to section theprocessing graph into two sections 900 and 930. The section 900 isconfigured (e.g., by the compiler 216) to generate a set of output tiles924 a, . . . , 924 d in a target tiling configuration of the section900, in response to processing a set of input tiles of the input tensor902 of the section 900. Similarly, the section 930 is configured togenerate a set of output tiles of the tensor 944 in an output targettiling configuration, in response to processing the set of input tiles933 a, . . . , 933 d of the input tensor 932 of the section 930. Asdiscussed, the target tiling configuration of the section 900 (e.g., inwhich the output tensor 920 is tiled) is different from an input tilingconfiguration of the 930 (e.g., in which the input tensor 932 is tiled).Thus, the output tensor 920 in the target tiling configuration of thesection 900 is transformed to generate the input tensor 932 in the inputtiling configuration of the section 930.

In an embodiment, whenever the reconfigurable processors 124 are to reada tile stored in the memory 140, the tile 140 is loaded initially in thelocal memory units 128, from which the reconfigurable processors 124then reads the tile. Similarly, whenever the reconfigurable processors124 finish processing and generating a tile that is to be materialized,the tile is stored from the reconfigurable processors 124 to the localmemory units 128, and then from the local memory units 128 to the memory140. Transfer of tiles between the memory 140, local memory units 128,and/or the reconfigurable processors 124 are, in an example, controlledby the data flow logic 286.

In an embodiment, the data flow logic 286 is configured to use directmemory access (DMA) engines to read from and write into the off-chipmemory 140. In an embodiment, the DMA engines are on-chip engines.

Although not illustrated in FIG. 9C, the input tensor 902 is alsogenerated by zero-padding and tiling another input. For example,generation of the input tensor 902, by zero-padding another input tensorand then tiling the zero-padded tensor, is discussed with respect toFIG. 6A. For example, the padded and tiled input tensor 610 of FIG. 6Acorresponds to the input tensor 902 of FIG. 9C.

Note that FIG. 9C illustrates a scenario where individual tensors havefour tiles. However, the teachings discussed with respect to FIG. 9C canbe applied for tensors having a larger number of tiles, such as thegeneral multi-tiled tensors discussed with respect to FIG. 7A.

Note that FIG. 9C illustrates a scenario where the 20×20 space 921 isreserved in the memory 140, and the 8×8 tensors 924 are written to thisspace 921, thereby generating the zero-padding along the periphery ofthe space 921. However, in another example, (and although notillustrated in FIG. 9C), the zero-padding may also be done in parallelwith writing the 8×8 tensors 924 to the memory 140. For example, whenthe tensors 924 are written to the memory 124, zero-padding of width 2is added to the tensors 924 in the memory 140, thereby generating thedesired zero-padding. In yet another example, the zero-padding isapplied after the 8×8 tensors are written to the memory 140.

Although FIG. 9C illustrates tile materialization, zero-padding and/ortile formatting (e.g., re-tiling) being performed in the memory 140, inanother example, one or more of these operations can also be performedin on-chip memory 128. For example, although not illustrated in FIG. 9C,the 20×20 space 921 illustrated in FIG. 9C can be initialized to zero inthe on-chip memory 128, and the tiles 924 can be written to this memoryspace 921 in the on-chip memory 128, this generating the zero-paddingaround the tensors. Similarly, the tile formatting (i.e., re-tiling) isalso done in the on-chip memory 128, similar to the discussion withrespect to FIG. 9C.

FIG. 9D illustrates a tiling materialization node 923 added between twoadjacent sections 900 and 923 of a processing graph. A tilingmaterialization (TM) node is added at graph cuts, whenever a tensorflows from one section of the processing graph to another section of theprocessing graph and a tiling transformation is required. In FIG. 9D,the TM node 923 is added between sections 900 and 930.

In an embodiment, for each processing node and tensor pair,corresponding tiling metadata is generated. For example, the inputprocessing node 908 of the section 900 has tiling metadata that is tiedto the input layer 908 and the tensor 902. The tiling metadata for the(processing node 908, tensor 902) pair includes information on how thetensor 902 is tiled, and includes one or more (or all) of the sizeinformation associated with the tensor 902, e.g., includes sizes36×36(F), 20×20(T), 36×36(M), and 4×4(MO) associated with the tensor902.

Similarly, the tiling metadata for the (output processing node 916,output tensor 920) includes tiling information of the output tensor 920,and the tiling metadata for the (input processing node 934, input tensor932) includes tiling information of the input tensor 932. In a sectioncut, as a tensor can possibly be reconfigured (e.g., zero-padded andre-tiled), the tiling metadata for (output processing node 916, outputtensor 920) would be different from the tiling metadata for (inputprocessing node 934, input tensor 932). A TM node, which is added to acorresponding section cut of the processing graph, represents atransformation from an output tile/tensor configuration in one sectionto an input tile/tensor configuration in an adjacent succeeding section.Thus, referring now to FIG. 9D, the TM node 923, which is added to thesection cut between sections 900 and 930 of the processing graph,represents a transformation from the configuration of the output tiles924 (see FIG. 9C) and the tensor 920 in the section 900 to theconfiguration of the input tiles 933 (see FIG. 9C) and the tensor 932 inthe adjacent succeeding section 930. In an embodiment, the TM node 923acts as a check-point, to materialize and save the output tile 920 fromthe processing node 916 in a first tiling configuration in the memory140, and read the input tile 932 in a second tiling configuration fromthe memory 140 to the processing node 934, as discussed herein.Generally, a TM node is added for every (processing node, tensor) pairthat crosses a section boundary when the tensor shapes on each side ofthe section boundary are incompatible, an example of which isillustrated in FIG. 9D.

As discussed, at a section boundary, an output tensor of a precedingsection is materialized and stored in the memory 140, where the outputtensor can possibly be reconfigured (as discussed with respect to FIG.9C), and then re-loaded as an input tile for a succeeding section. TheTM node associated with the section boundary tracks a first tilingmetadata for the output tensor of the preceding section being stored inthe memory 140, as well as tracks a second tiling metadata for the inputtensor of the succeeding section being loaded from the memory 140. Thus,the first tiling metadata is associated with a store-to-memoryoperation, while the second tiling metadata is associated with aload-from-memory operation. The tiling metadata can be stored in thememory 140, and/or within the local memory units 128.

In the example of FIG. 9D discussed above, a TM node (such as the TMnode 923) acts as a check-point, to materialize and save an outputtensor from an output processing node in a first tiling configuration inthe off-chip memory 140, and to read an input tensor in a second tilingconfiguration from the off-chip memory 140 to an input processing node,as discussed herein. Thus, in an example, the TM node is associated withsaving a tensor in a first tiling configuration to the off-chip memory140, and reading the tensor in a second tiling configuration from theoff-chip memory 140. However, in another example and although notillustrated in FIG. 9D, a TM node may be fully executed on-chip, withoutthe need to store to and load from the off-chip memory 140. In such anexample, the TM node saves a tensor in a first tiling configuration tothe on-chip memory 128, and reads the tensor in a second tilingconfiguration from the on-chip memory 128.

FIGS. 9C and 9D discussed herein above are specifically about how atensor is materialized and processed at a section cut. FIG. 9Eillustrates materialization of a tensor at a layer of a processing graphthat is not immediately adjacent to a section cut. For example, FIG. 9Eillustrates a manner in which the tensor 910 is materialized, where thetensor is within a section and is not an input or output tile of anysection. For example, the layer 908 outputs individual tiles of thetensor 910. In an embodiment, the data flow logic 286 (illustrated inFIG. 2) materializes the tiles 834 a, . . . , 834 d of the tensor 910,e.g., stores the tiles 834 to the memory 140, as illustrated in FIG. 9Eand as discussed with respect to FIG. 8A as well. For example, the tiles834 are transmitted to the memory 140 via the external I/O interface 150and the line 145 (illustrated in FIG. 2).

In an embodiment, the data flow logic 286 causes transmission of thetiles 834 a, . . . , 834 d individually and independently to the memory140 from the array 190, as and when the tiles are generated. Forexample, once the array 190 generates the tile 834 a, the data flowlogic 286 causes transmission of the tile 834 a from the array 190 tothe memory 140; then once the array 190 generates the tile 834 b, thedata flow logic 286 causes transmission of the tile 834 b from the array190 to the memory 140, and so on.

In another embodiment, the data flow logic 286 causes transmission ofthe tiles 834 a, . . . , 834 d collectively to the memory 140 from thearray 190. For example, the data flow logic 286 waits until all thetiles 834 a, 834 b, 834 c, 834 d are generated. Once all the tiles 834a, 834 b, 834 c, 834 d are generated, the data flow logic 286 causestransmission of the tiles 834 a, . . . 834 d collectively or in a batchto the memory 140 from the array 190.

As discussed with respect to FIG. 8A, although the tiles 834 areoverlapping tiles, the tiles 834 are stored in a non-overlapping mannerin the memory 140. Accordingly, the overlap region 835 between the tiles834 a and 834 b are written twice in the memory (e.g., once as a part ofthe tile 834 a and once more as a part of the tile 834 b), as discussedwith respect to FIG. 8A.

The tiles 834 a, 834 b, 834 c, 834 d are read back from the memory 140by the array 190, during the convolution operation at the processingnode 912. In an embodiment, peripheral pixels 911 of the tensor 910 areforced to zero, as discussed with respect to FIG. 6C herein previously,prior to the read-back of the tiles during the convolution operation atthe processing node 912.

FIG. 9F illustrates processing and/or materialization of tensors at twosections of the forward pass of a processing graph. FIG. 9F, in essence,summarizes various discussion with respect to FIGS. 6A-6C and 9B-9E. Forexample, the various processing nodes or layers in individual ones ofthe sections 900 and 930, as illustrated in FIG. 9F, are also discussedwith respect to FIGS. 9B-9E. For example, tensor 901 (e.g., which can bean input image 901 comprising a plurality of pixels) is zero-padded andtiled, to generate the input tensor 902 of the section 900. Generationof the tensor 902 from the tensor 901 has been discussed with respect toFIGS. 6A-6C. As illustrated, the tensor 901 is an input image with asize of 32×32, and occupies 32×32 space in the memory 140. The tensor902 is a 36×36 tensor having 20×20 tiles, and is stored as a 36×36tensor in the memory 140, with a 4×4 overlap, as illustrated in FIGS. 6Aand 9F.

The layer 908 processes the input tensor 902, to generate theintermediate tensor 910. As illustrated, the output of the layer 902(e.g., the tensor 910) is stored on a tile-by-tile basis into the memory140, and read on a tile-by-tile basis from memory 140 by the next layer912, as also discussed with respect to FIG. 9E. Similarly, the output ofthe layer 912 (e.g., the tensor 914) is also stored on a tile-by-tilebasis into the memory 140, and read on a tile-by-tile basis from memory140 by the next layer 916, similar to the discussion with respect toFIG. 9E.

The output of layer 916 is stored on a tile-by-tile basis into memory140 and aggregated or composed into tensor 920 (where zero-paddingoccurs while storing the tiles, as discussed with respect to FIG. 9C)and then re-tiled, and read on a tile-by-tile basis from memory 140 bythe layer 932, as discussed in further detail with respect to FIGS. 9Cand 9D. Outputs of layers 934 and 938 are also processed similar to theoutputs of layers 908 and 912, respectively, in an example, asillustrated in FIG. 9F.

Graph Sections Including Single Forward Section and Single BackwardSection

FIG. 10A illustrates a processing graph comprising one forward section900 and one backward section 1000. The processing graph is used toimplement a neural network, such as a CNN, a FCNN, an RNN, a LSTMnetwork, an autoencoder, a deep belief network, a GAN, and/or the like.The forward section 900 implements a forward subgraph, and the backwardsection 1000 implements a backward subgraph.

The forward section 900 illustrated in FIG. 10A is also illustrated anddiscussed with respect to FIGS. 9A-9E. Each of the sections 900 and 1000of the processing graph comprises a sequence of processing nodes orlayers. Each individual processing node or layer performs acorresponding operation. For example, the layers in the sequence oflayers of each of the sections 900 and 1000 can include one or more ofconvolution layers, max pooling layers, min pooling layers, averagepooling layers, non-linearity layers, normalization layers, dropoutlayers, concatenation layers, transpose convolution layers, fullyconnected layers, softmax layers, and/or loss layers, although not allsuch operations are illustrated in FIG. 10A.

For example, as discussed with respect to FIGS. 9A-9F, the forwardsection 900 comprises a sequence of processing nodes or layers 908, 912,and 916. The layer 908 implements a convolution operation on the inputtensor 902, to generate the intermediate tensor 910. The layer 912implements a convolution operation on the intermediate tensor 910, togenerate the intermediate tensor 914. The layer 912 implements amax-pool operation on the intermediate tensor 914, to generate theoutput tensor 920 and the index tensor 922, as also discussed withrespect to FIG. 9A.

The backward section 1000 also comprises a sequence of processing nodesor layers 1016, 1012, and 1008. The layer 1016 performs backwardmax-pooling, and each of the layers 1012 and 1008 perform transposeconvolution. In general, in a backward section, weight gradients andinput gradients are calculated.

In some examples, the weight gradient dW(L) at layer L is a function of(i) loss (L+1) of the backward pass (i.e., the loss at layer (L+1)) and(ii) tensor at layer L of the forward pass. For example, a weightgradient at layer 1012 is a function of loss at layer 1016 and thetensor 910 that is input to the corresponding layer 912. The weightgradient at layer 1012 has a dimensionality that is equal to adimensionality of the convolution kernel used at layer 912. During atraining process, the weight gradient at layer 1012 is used to updateweights of the convolution kernel at layer 912. For example, if a 3×3kernel is used, the weight gradient at layer 1012 is also 3×3. Becauseweight gradients are relatively smaller in size compared to the tensorgradients, in an example, calculation of weight gradients may notinvolve tiling (e.g., weights are not tiled). Accordingly, FIG. 10Aillustrating the backward section 1000 does not illustrate flow ofweight gradients. Specifically, FIG. 10A illustrates flow of inputgradients, and not flow of weight gradients. Determination of the weightgradient at a specific layer is done by summing or accumulating multipletiled-weight gradients, where each tiled-weight gradient is determinedbased calculations performed on a corresponding tile, as will bediscussed in further detail with respect to FIG. 10B.

In an example, a loss of a layer L in a backward section is a functionof loss from layer (L+1) of the backward pass and weight from layer L ofthe forward pass. Thus, loss at layer 1012 is a function of loss fromlayer 1016 and the weight from layer 912.

In an embodiment, an output of the section 900 is processed to generatea loss function (labelled symbolically using dotted lines and labelledas “Loss function calculation 948” in FIG. 10A). The loss function isused in the backward section 1000, e.g., to calculate the inputgradients (or tensor gradients) at various layers. For example, therepresentation 1020 is a gradient tensor, also referred to as inputgradient. The gradient tensor 1020 has an actual size of 16×16, with 8×8tile size, and stored in the memory 140 as 16×16 gradient tensor withzero overlap.

The layer 1016 receives the gradient tensor 1020, the index tensor 922from the forward section 900, and the weight from the layer 916. Thelayer 1016 implements a backward max-pooling, to generate anintermediate loss gradient tensor 1014. For example, the intermediategradient tensor 1014 has a size of 32×32, with non-overlapping tiles of16×16 size. Each tile of the intermediate gradient tensor 1014 isgenerated based on corresponding gradient tile of the gradient tensor1020. Although not illustrated, the layer 1014 also generates the weightgradient for the output layer 916 of the section 900.

The intermediate layer 1012 of the section 1000 receives the gradienttensor 1014 (e.g., having a size of 32×32, with tile size of 16×16).Each 16×16 tile of the tensor 1014 is transpose convolved at layer 1012using the weight of layer 912, to generate a corresponding 18×18 tile ofanother intermediate gradient tensor 1010. Because of transposeconvolution, the size of the gradient tensors in the backward section1000 progressively increases, as illustrated in FIG. 10A. Theintermediate gradient tensor 1010 has a size of 34×34, with 18×18 tilesthat have a 2×2 overlap. However, the 18×18 tiles of the intermediategradient tensor 1010 are stored in a non-overlapping manner in thememory 140, as a result of which the intermediate gradient tensor 1010occupies a space of 36×36, with zero “MO” overlap between the tiles inthe memory 140. Although not illustrated, the layer 1012 also generatesweight gradient for the output layer 912 of the section 900.

The final layer 1008 of the section 1000 receives the gradient tensor1010 (e.g., having a size of 34×34, with tile size of 18×18) and each18×18 tile is transpose convolved (e.g., using weights of the layer908), to generate corresponding 20×20 tile of a gradient tensor 1002.The gradient tensor 1002 has a size of 36×36, with 20×20 tiles that havea 4×4 overlap. The 20×20 tiles of the gradient tensor 1002 are stored inan overlapping manner in the memory 140, as a result of which thegradient tensor 1002 occupies a space of 36×36, with 4×4 “MO” overlapbetween the tiles in the memory 140. Thus, the gradient tensor 1002 isstored in the memory 140 with a 4×4 overlap, similar to the input tensor902 of the section 900. Although not illustrated, the layer 1008 alsogenerates weight gradient for the layer 908 of the section 900.

Weight Gradient Calculation by Summing Multiple CorrespondingTiled-Weight Gradients

FIG. 10B illustrates tile-wise calculation of weight gradients for alayer in a backward section of a processing graph. The processing graphillustrated in 10B is same as the processing graph illustrated in FIG.10A. FIG. 10B specifically illustrates calculation of the weightgradient at layer 1012 of the backward section 1000.

As illustrated in FIG. 10B, the input to the layer 1012 is the gradienttensor 1014 having four tiles, such as tiles 1015 a, 1015 b, 1015 c, and1015 d. Assume that a weight gradient 1011 a is generated based on tile1015 a, a weight gradient 1011 b is generated based on tile 1015 b, aweight gradient 1011 c is generated based on tile 1015 c, and a weightgradient 1011 d is generated based on tile 1015 d. For example, theweight gradient 1011 a at layer 1012 is a function of loss indicated bytile 1015 a of the gradient tensor 1014 and a corresponding tile of thetensor 910. Similarly, the weight gradient 1011 b at layer 1012 is afunction of loss indicated by tile 1015 b and another corresponding tileof the tensor 910, and so on. Each of the weight gradients 1011 a, 1011b, 1011 c, and 1011 d have a dimensionality that is identical to that ofthe convolution kernel used at layer 912. Merely as an example, each ofthe weight gradients 1011 a, 1011 b, 1011 c, and 1011 d is assumed tohave a dimensionality of 3×3. In an example, the weight gradients 1011a, 1011 b, 1011 c, and 1011 d are also referred to herein as“tiled-weight gradients” or “partial-weight gradients” 1011 a, 1011 b,1011 c, and 1011 d, as these are specific to corresponding tiles, and donot represent the final weight gradient.

In an embodiment, an overall weight gradient 1013 for the layer 1012 isgenerated based on the tiled-weight gradients 1011 a, 1011 b, 1011 c,and 1011 d. For example, the weight gradient 1013 for the layer 1012 isbased on a summation (or accumulation) of the tiled-weight gradients1011 a, 1011 b, 1011 c, and 1011 d. For example, initially, thetiled-weight gradient 1011 a is generated, and stored in an on-chipmemory 128. Then the tiled-weight gradient 1011 b is generated and addedto the tiled-weight gradient 1011 a, and the sum is stored in theon-chip memory 128. Then the tiled-weight gradient 1011 c is generatedand added to the previous sum, and the updated sum is stored in theon-chip memory 128. Finally, the tiled-weight gradient 1011 d isgenerated and added to the previous sum, to generate the overall weightgradient 1013 for the layer 1012. In an example, the weight gradient1013 can be normalized or averaged (e.g., divided by 4, as fourtiled-weight gradients 1011 a, . . . , 1011 d were summed to generatethe weight gradient 1013). The overall or final weight gradient 1013, inan example, is then stored in the off-chip memory 140. In an embodiment,the weight gradient 1013 is used to update the weights of the kernelused in the convolution layer 912 of the forward pass section 900. Theweight gradients for various other layers are also calculated in asimilar manner. Thus, in an example, the partial weight gradients 1011a, . . . , 1011 d are stored in the same place in on-chip memory 128,i.e. the partial sums are accumulated in-place. Following the executionof all tiles times all batch elements (e.g., as specified by the user)and generation and accumulation of the partial weight gradients, theaccumulated final weight gradient is written into the off-chip-memory140 for consumption by the chosen optimization algorithm to perform aweight update. In another example and contrary to the illustration ofFIG. 10B, the final weight gradient 1013 is calculated and stored in theon-chip memory 128 as well.

Processing Graph Including Multiple Forward and Backward Sections

FIG. 10C illustrates a processing graph comprising multiple forwardsections 900, 930, and multiple backward sections 1000, 1030. Althoughtwo forward sections and two backward sections are illustrated, thegraph can include a higher number of forward and backward sections. Theprocessing graph is used to implement a neural network, such as a CNN, aFCNN, an RNN, a LSTM network, an autoencoder, a deep belief network, aGAN, and/or the like. Each of the forward sections 900, 930 implement acorresponding forward subgraph, and each of the backward sections 1000,1030 implements a corresponding backward subgraph. Operations ofindividual ones of the sections 900, 930, 1000, 1030 will be apparent tothose skilled in the art, in view of discussion of various sections withrespect to FIGS. 9A-10C.

Read-Modify-Write Operation Between Two Backward Sections

As illustrated in FIG. 10C, an output layer 1034 of the backward section1030 outputs a tensor 1032, which is transformed to a tensor 1020 thatis received by an input layer 1016 of the subsequent backward section1000. Transformation of an output of the layer 1034 to form an input ofthe layer 1016 involves (i) “read-modify-write” operations discussedwith respect to FIG. 11A and (ii) discarding peripheral pixels discussedwith respect to FIG. 11B.

FIG. 11A illustrates a “read-modify-write” operation, to transform anoutput of an output layer of a backward section to an input of an inputlayer of a subsequent backward section. The “read-modify-write”operation is performed at a section boundary of a backward pass.

Referring to FIG. 11A, illustrated are the sections 900 and 930 of theforward pass and sections 1000 and 1030 of the backward pass. Theprocessing nodes of the sections 900 and 930 and some of the processingnodes of the sections 1000 and 1030 are not illustrated in FIG. 11A forpurposes of illustrative clarity—however, the sections 900, 930, 1000,and 1030 illustrated in FIG. 11A are similar to the correspondingsections illustrated in FIG. 10C. Furthermore, the dimensionality ofcorresponding tensors in FIGS. 10C and 11A are the same.

In FIG. 11A, assume that the layer 1034 is output to four tiles 1104 a,1104 b, 1104 c, 1104 d, which form the output tensor 1032. Individualones of the tiles 1104 a, 1104 b, 1104 c, 1104 d have a size of 12×12,and are stored as a 20×20 tensor 1032 in the memory 140, andaccordingly, have an overlap of 4×4 in the memory 140. Theread-modify-write operation illustrated in FIG. 11A shows how the tiles1104 a, 1104 b, 1104 c, 1104 d are stored in the memory 140.

In FIG. 11A, there are four arrow-shapes 1107 a, . . . , 1107 d, withtext within each arrow, and each arrow 1107 indicates a correspondingaction associated with a corresponding tile of the tiles 1104 a, 1104 b,1104 c, 1104 d. A bottom section of the figure, from right to left,shows a manner in which the tiles 1104 a, 1104 b, 1104 c, 1104 d arewritten to the memory 140. Various operations are indicated by acorresponding number within an oval.

Referring to the bottom-right section of FIG. 11A, initially, at step 1,a 20×20 region comprising corresponding 20×20 content 1101 isinitialized to zero, and is reserved or allocated for storing the tiles1104 a, 1104 b, 1104 c, 1104 d of the tensor 1032. Thus, the 20×20 dataor content 1101 has zero values stored in the memory 140.

At step 2, the content 1101 of the region from the memory 140 is read bythe processors 124 (see FIG. 2), added to the tile 1104 a by theprocessors 124, and written back to the memory 140 as content 1103 a, asillustrated symbolically using the arrow 1107 a. Thus, this is referredto as a first “read-modify-write” operation, as the content 1101 is readfrom memory 140, modified (e.g., by adding the tile 1104 a), and writtenback to the memory 140 as content 1103 a. Note that the contents 1101and 1103 a occupy the same space or region in the memory 140.

Note that the tile 1104 a is a 12×12 tile and the content 1101 is20×20—hence, there is a dimensionality mismatch during the addition ofthe content 1101 and the tile 1104 a. This can be resolved by one of twopossible ways: (i) the tile 1104 a is added to a 12×12 section at atop-left corner of the content 1101, or (ii) the 12×12 tile 1104 a isexpanded to a 20×20 tile, with the top-left corner of the expanded tilecomprising the original 12×12 tile 1104 a, and the expanded 20×20 tileis added to the content 1101.

At step 3, the content 1103 a from the memory 140 is read by theprocessors 124, added to the tile 1104 b, and written back to the memory140 as content 1103 b, as illustrated symbolically using the arrow 1107b. Thus, this is referred to as a second “read-modify-write” operation,as the content 1103 a is read from memory 140, modified (e.g., by addingthe tile 1104 b), and written back to the memory 140 as content 1103 b.Note that the contents 1101, 1103 a and 1103 b occupy the same space orregion in the memory 140. The difference in dimensionality between thetile 1104 b and the content 1103 a during the addition operation ishandled in a manner similar to the discussion with respect to step 2.

Note that each of the tiles 1104 a and 1104 b is a 12×12 tile, and thereis a 12×4 overlap 1106 between the two tiles 1104 a, 1104 b in thecontent 1103 a. Thus, the 12×4 overlap 1106 is a summation of (i) a 12×4section on a right periphery of tile 1104 a and (ii) another 12×4section on a left periphery of tile 1104 b. For example, a pixel in theoverlap 1106 is a summation of a corresponding pixel from the tile 1104a and another corresponding pixel from the tile 1104 b.

At step 4, the content 1103 b from the memory 140 is read by theprocessors 124, added to the tile 1104 c by the processors 124, andwritten back to the memory 140 as content 1103 c, as illustratedsymbolically using the arrow 1107 c. This is referred to as a thirdread-modify-write operation. Note that the contents 1101, 1103 a, 1103 band 1103 c occupy the same space or region in the memory 140. Thedifference in dimensionality between the tile 1104 c and the content1103 b during the addition operation is handled in a manner similar tothe discussion with respect to step 2.

Note that each of the tiles 1104 a, 1104 b, and 1104 c is a 12×12 tile,and there is a 4×8 overlap 1108 between the two tiles 1104 a, 1104 c inthe content 1103 c. Also, now the overlap 1106 has two sections: an 8×4overlap 1106 a between tiles 1104 a, 1104 b, and a 4×4 overlap betweentiles 1104 a, 1104 b, 1104 c. Similar to the earlier discussion, the 4×8overlap 1108 is a summation of (i) a 4×8 section on a bottom peripheryof tile 1104 a and (ii) another 4×8 section on a top periphery of tile1104 c. Similarly, the 4×4 overlap 1106 b is a summation of 4×4corresponding sections from each of the tiles 1104 a, 1104 b, 1104 c.

At step 5, the content 1103 c from the memory 140 is read by theprocessors 124, added to the tile 1104 d by the processors 124, andwritten back to the memory 140 as content 1103 d, as illustratedsymbolically using the arrow 1107 d. Thus, this is referred to as afourth read-modify-write operation. Note that the contents 1101, 1103 a,1103 b, 1103 c and 1103 d occupy the same space or region in the memory140. The difference in dimensionality between the tile 1104 d and thecontent 1103 c during the addition operation is handled in a mannersimilar to the discussion with respect to step 2.

Note that each of the tiles 1104 a, 1104 b, 1104 c, and 1104 d is a12×12 tile, and there are overlaps 1106 a, 1106 b, 1108, 1112, and 1110,as illustrated in FIG. 11A. Each of the overlaps 1106 a, 1108, 1112, and1110 is a summation of corresponding sections of two corresponding onesof the tiles 1104 a, 1104 b, 1104 c, and 1104 d. The 4×4 overlap 1106 bis a summation of corresponding sections of all the tiles 1104 a, 1104b, 1104 c, and 1104 d.

The content 1103 d is the 20×20 output tensor 1132, with four tiles 1104a, 1104 b, 1104 c, and 1104 d, with an overlap of width 4 in the memory140. As discussed, the output tensor 1132 is saved in the memory 140.

FIG. 11B illustrates reconfiguration of the output tensor 1132, which isoutput by the backward section 1130 of FIGS. 10B and 11A, to generatetiles 1154 a, . . . , 1154 d of the input tensor 1020 of the subsequentbackward section 1000, where the input tensor 1020 has peripheral pixelsthat are ignored or discarded when generating the tiles 1154 a, . . . ,1154 d of the input tensor 1020. Note that the red-modify-writeoperations discussed with respect to FIG. 11A occurs at output of abackward section, and is accompanied by the peripheral pixel discardingoperations of FIG. 11B at the input of a subsequent backward section.Thus, operations discussed with respect to FIGS. 11A and 11B areperformed at section breaks in the backward pass (and may not beperformed within a section). In an example, these operations may notoccur at section breaks in the forward pass.

Referring to FIG. 11B, illustrated on a top-right side of the figure isthe output tensor 1032, which is the region 1103 d and generation ofwhich is discussed with respect to FIG. 11A. As discussed with respectto FIG. 11A, the output tensor 1032 has overlapping tiles 1104 a, . . ., 1104 d. The tiling configuration of the output tensor 1032 isillustrated at a bottom-right side of the figure.

In an embodiment, the output tensor 1032 is re-tiled, to generate tiles1154 a, 1154 b, 1154 c, 1154 d of the input tensor 1120. Each of thetiles 1154 a, 1154 b, 1154 c, 1154 d is 8×8, and the tiles 1154 a, 1154b, 1154 c, 1154 d are non-overlapping and occupies a central space of16×16 within the tensor 1120, while the tensor 1120 itself is 20×20.This leaves a border or peripheral region comprising peripheral pixels1160 having a width of, for example, 2. The peripheral pixels 1160 areignored or discarded while generating the tiles 1154 a, . . . , 1154 d.For example, the peripheral pixels 1160 are not included in any of thetiles 1154 a, . . . , 1154 d. Thus, the tensor 1120 has a border of 2,as illustrated in the symbolic representation of the tensor 1020, and asalso illustrated within the tensor 1020 in FIG. 10C. Note that thetensor dimension does not change during the retiling—both the tensors1132 and 1120 are 20×20.

Referring to FIGS. 9B-9D and 10C, recall that when generating the tensor932 from the tensor 920, a zero-padding 925 was added (e.g., see FIG.9C). Ignoring the peripheral pixels 1160 with width 2 in the backwardpass of FIG. 11B compensates for the addition of zero-padding 925 ofwidth 2 in the forward pass of FIG. 9C. For example, ignoring theperipheral pixels 1160 with width 2 in FIG. 11B generates results thatare same as results generated for a scenario where the tensors were nottiled and processed as a whole.

Graph Metadata Generation and Tiling Decision

FIG. 12A illustrates a flowchart depicting a method 1200 for generatinggraph metadata that includes tiling decisions for a processing graph,and compiling the processing graph based on the tiling decisionsincluded in the metadata. FIG. 12B illustrates example sections of aprocessing graph, and also illustrates notations used in discussing themethod 1200 of FIG. 12A.

At 1204 of the method 1200, a processing graph is received, such as anyprocessing graph discussed herein (such as the processing illustrated inFIG. 12B, or any other figure of this disclosure). In an example, theprocessing graph comprises a plurality of sections, where each sectioncomprises a sequence of processing nodes 1, . . . , N, where N is apositive integer greater than 1.

Note that in an embodiment, each section of the processing graph has thesame number of processing nodes N. However, in another embodiment,different sections of the processing graph can include different numberof processing nodes. For example, in such a scenario, the method 1200has to be revised accordingly. For example, assume that a section S1 hasN1 number of processing nodes, a section S2 has N2 number of processingnodes, a section S3 has N3 number of processing nodes, and so on. Thenumbers N1, N2, N3 are positive integers greater than 1, and individualones of the numbers N1, N2, N3 can be same or different. Merely as anexample, N1 can be equal to N2, each of which can be different from N3.

The method 1200 illustrated in FIG. 12A assumes that each section of theprocessing graph has the same number of processing nodes N. However, incase different sections have different number of processing nodes (e.g.,number N1, N2, N3 of processing nodes), the method 1200 can beappropriately modified, as will be appreciated by those skilled in theart. For example, blocks 1208-1224 are repeated for each section, andblock 1204 is also executed for each section. Thus, for example, whenexecuting the blocks 1204-1224 of the method 1200 for section S1, thenumber N can be changed to N1; for section S2, the number N can bechanged to N2; and so on.

As discussed herein earlier, the plurality of sections comprises one ormore forward sections (e.g., sections in the forward path of theprocessing graph) and one or more backward sections (e.g., sections inthe backward path of the processing graph). For example, in the examplegraph illustrated in FIG. 12B, section 900 is a forward section, andsection 1000 is a backward section. Note that the graph in FIG. 12B issimilar to that in FIG. 10A, and various components in both the graphsin FIGS. 10A and 12B are labeled using same labels.

The processing nodes 1, . . . , N are labelled differently for forwardsections and backward sections. For example, as illustrated in block1204 of the method 1200, for individual sections in the forward path, acorresponding input node forms a corresponding 1^(st) processing node(or processing node 1) of the section. For example, referring to FIG.12B, the input processing node 908 of the forward section 900 forms theprocessing node 1 of the section 900. Similarly, referring to FIG. 9B,the processing node 934 forms the processing node 1 of the section 930.

Similarly, the output node of individual forward section is labelled asprocessing node N. For example, for the forward section 900 of FIG. 12B,the output node 916 is the processing node N. Similarly, referring toFIG. 9B, the processing node 942 forms the processing node N of thesection 930. Intermediate processing nodes, between processing nodes 1and N, are progressively labelled as processing nodes 2, . . . , (N−1).In the example of FIGS. 9B and 12B, N=3 for both forward and backwardpasses.

The tensors of individual forward sections are also labelled as 1, . . ., (N+1) corresponding to the N number of processing nodes. For example,as illustrated in FIG. 12B, for a forward section, processing node 1receives tensor 1 and outputs tensor 2, processing node 2 receivestensor 2 and outputs tensor 3, processing node N receives tensor N andoutputs tensor (N+1), and so on.

As also illustrated in block 1204 of the method 1200, for individualsections in the backward path, a corresponding input node forms acorresponding N^(th) processing node (or processing node N) of thesection. For example, referring to FIG. 12B, the input processing node1016 of the backward section 1000 forms the processing node N of thesection 1000. Similarly, referring to FIG. 10C, the processing node 1042forms the processing node N of the section 1030. Similarly, the outputnode of individual backward section is labelled as processing node 1.For example, for the backward section 1000 of FIG. 12B, the output node1008 is the processing node 1, and intermediate processing nodes,between processing nodes 1 and N, are progressively labelled asprocessing nodes 2, . . . , (N−1).

The tensors of individual backward sections are also labelled as 1, . .. , (N+1) corresponding to the N number of processing nodes in thebackward sections. For example, as illustrated in FIG. 12B, processingnode N receives tensor (N+1) and outputs tensor N, processing node (N−1)receives tensor N and outputs tensor (N−1), processing node 1 receivestensor 2 and outputs tensor 1, and so on.

The method 1200 then proceeds from 1204 to 1208. It is to be noted thatoperations depicted in blocks 1208-1224 of the method 1200 are performedfor each section (e.g., each forward and backward section) of theprocessing graph. The tiling decisions associated with individualsections are generated individually and independently.

At 1208, the graph metadata generation logic 109 (e.g., see FIG. 1)determines a (N+1)^(th) tiling configuration comprising a set ofnon-overlapping tiles for a (N+1)^(th) tensor. As discussed above, for aforward section, (N+1)^(th) tensor is the output tensor; and for abackward section, (N+1)^(th) tensor is the input tensor. Thus,initially, the graph metadata generation logic 109 determines tilingconfiguration of output tensors of individual forward sections, andtiling configuration of input tensors of individual backward sections.Merely as an example, referring to FIG. 9B, at 1208, the tilingconfiguration of output tensors 920 and 944 of forward sections 900 and930, respectively, are determined at 1208, where the tilingconfiguration comprises non-overlapping tiles. Similarly, referring toFIG. 10C, at 1208, the tiling configuration of input tensors 1044 and1020 of backward sections 1030 and 1000, respectively, are determined at1208, where the tiling configuration comprises non-overlapping tiles.

The determination at 1208 are for tiling configurations of outputtensors for forward sections, and tiling configurations of input tensorsfor backward sections. The (N+1)^(th) tiling configurations for tensorsfor various sections determined at 1208 are also referred to as targettiling configurations, as the tiling decisions are made to satisfy thetarget tiling configurations. A (N+1)^(th) tiling configurationdetermined for a specific section can be based on a variety of factors.For example, the (N+1)^(th) tiling configuration determined for aspecific section is based on a number of processing nodes in thecorresponding section, and respective processing logics or functions(such as convolution, pooling, etc.) implemented by respectiveprocessing nodes in the corresponding section. For example, if there area number of processing nodes implementing convolution operation, theremight be some dimension reduction during the convolution operation, andthe (N+1)^(th) tiling configuration is determined taking into accountsuch factors.

In an embodiment, the tiling decision at 1208 is made based on a size ofthe tensor (N+1). For example, referring to FIG. 9B, the output tensor920 is 16×16, and this tensor is to be tiled into non-overlapping tiles.Choices of tiling decisions can include tiles having size 8×8, 4×4, or2×2. That is, the tensor size is divisible by the tile size, as thetiles here are non-overlapping. The decision to, for example, select 8×8over 4×4 and 2×2 is implementation specific, and can be based on factorssuch as memory storage capacity of the local memory unit 128 and/or theoff-chip memory 140.

In an embodiment, the tiling decision at 1208 is made based on a size ofthe tensor 1. For example, referring to FIG. 9B, a size of the inputtensor 902 dictates the size of the output tensor 920, and the size ofthe tiles of the output tensor 920 is based on the size of the outputtensor 920. Thus, the size of the tiles of the output tensor 920 (e.g.,which is the (N+1)^(th) tiling configuration for the section 900) isbased on a size of the input tensor 902.

The output tensor 920 is 16×16, and this tensor is to be tiled intonon-overlapping tiles. Choices of tiling decisions can include tileshaving size 8×8, 4×4, or 2×2. That is, the tensor size is divisible bythe tile size, as the tiles here are non-overlapping. The decision tochoose 8×8 over 4×4 and 2×2 is implementation specific, and can be basedon factors such as memory storage capacity of the local memory unit 128and/or the off-chip memory 140.

In an embodiment, the (N+1)^(th) tiling configurations for tensors forvarious sections are pre-specified in the processing graph. In such ause case, the determination step at 1208 comprises accessing theprocessing graph received at 1204, and simply reading the (N+1)^(th)tiling configurations from the processing graph received at 1204.

After the tiling configuration of the (N+1)^(th) tensor is determined,the tiling configuration of the (N+1)^(th) tensor is added to the graphmetadata. Subsequently, the tiling configuration of remaining tensors N,(N−1), . . . , 1 are successively determined at blocks 1212-1224. Forexample, the method 1200 proceeds from block 1208 to 1212, where atensor index i is initialized to have the value of “N”.

The method then 1200 proceeds from block 1212 to 1216, where the graphmetadata generation logic 109 determines an i^(th) tiling configurationcomprising a set of overlapping tiles for an i^(th) tensor, based on apreviously determined tiling configuration for the (i+1)th tensor, andadds the i^(th) tiling configuration to the graph metadata. For example,during a first iteration of the method 1200 (where i=N), for eachsection, an N^(th) tiling configuration for the N^(th) tensor isdetermined from the (N+1)^(th) tiling configuration of the (N+1)^(th)tensor. Similarly, during a second iteration of the method 1200 (where iwould now be (N−1)), for each section, an (N−1)^(th) tilingconfiguration for the (N−1)^(th) tensor is determined from the N^(th)tiling configuration of the N^(th) tensor. Similarly, during a lastiteration of the method 1200, for each section, a 1^(st) tilingconfiguration for the 1^(st) tensor is determined from the 2^(nd) tilingconfiguration of the 2^(nd) tensor.

Merely as an example, referring to FIG. 9B, once the tilingconfiguration of the output tensor 920 is determined, the tilingconfiguration of the intermediate tensor 914 can be determined, based(i) the tiling configuration of the output tensor 920, (ii) a padding, akernel size, and a stride used during the convolution in the processingnode 916, and (iii) equation 1 and 2, or a variation of these equations.

For example, equations 1 and 2 are usable to calculate size of an outputtile, based on a size of an input tile. In contrast, for a section inthe forward pass, the tiling decision is made in a direction that isopposite or reverse of the direction of data flow. For example, for asection in the forward pass, a tile in a tensor i+1 is generated from acorresponding tile in tensor i, and the method 1200 has to generatetiling configuration of tensor i from tiling configuration of tensor(i+1). Thus, for a forward section, an inverse of equations 1 and 2 canbe used, as follows:

W _(i)=(W _(o)−1)*S _(w) +K _(w) −P _(w)  Equation 3

H _(i)=(H _(o)−1)*S _(h) +K _(h) −P _(h)  Equation 4

Equations 3 and 4 and usable for the determination at 1216 forindividual forward sections, where W_(o) and H_(o) are width and heightof tiles of tensor (i+1), W_(i) and H_(i) are width and height of tilesof tensor i, and S_(w), K_(w), P_(w), S_(h), K_(h), P_(h) areconvolution parameters discussed with respect to equations 1 and 2 andare for the processing node i. As discussed herein previously, for boththe forward and backward sections, except for the tensor (N+1), othertensors have overlapping tiles.

It is to be noted that the tiling configuration of a tensor not onlyspecifies the tile sizes of a tensor, but also specifies padding size(if applicable) applied to the tensor, as well as overlap among thetiles. For example, if a tensor is to be zero-padded (as discussed withrespect to FIGS. 6A-6C and 7A), the tiling configuration will includethe size of such zero-padding. Similarly, if peripheral pixels of atensor are to be forced to zero (as discussed with respect to FIG. 6C),the tiling configuration will include such information for thecorresponding tensor. In an embodiment, the tiling configuration of atensor includes the sizes denoted by “F”, “T”, “M”, and “MO” for thetensor, as discussed with respect to FIG. 9A. In some embodiments,information associated with zero-padding and/or zero-forcing ofperipheral pixels are stored in the graph metadata, and maybe possiblybe stored separately from the tiling configuration.

In an embodiment, the graph metadata includes various convolutionparameters associated with convolution operations performed by one ormore processing nodes. For example, the parameters S_(w), K_(w), P_(w),S_(h), K_(h), P_(h) discussed with respect to equations 1-4 are storedfor those processing nodes that perform the convolution operations.

Thus, for example, for the processing node 908 of section 900 of FIG.9B, the graph metadata stores the tiling configuration of the tensors902 and/or 910 (including sizes denoted by “F”, “T”, “M”, and “MO” forthese tensor), and also stores convolution parameters S_(w), K_(w),P_(w), S_(h), K_(h), P_(h) for the convolution to be performed by theprocessing node 908. The graph metadata stores similar information forvarious other processing nodes of various other sections.

The method 1200 proceeds from 1216 to 1220, where a determination ismade as to whether tiling configurations for all tensor in individualsections have been considered. For example, at 1220, a determination ismade as to whether tensor index i=1.

If the tensor index i is not equal to 1 (e.g., if “No” at 1220), thisimplies that not all tensors have been considered yet. In such ascenario, the method 1200 proceeds from 1220 to 1224, where the tensorindex i is decremented by one. The method 1200 then loops back fromblock 1224 to block 1216. Thus, operations at blocks 1216, 1220, and1224 are repeated for N number of times, where tiling configuration fortensor N is determined during the 1st iteration, where tilingconfiguration for tensor (N−1) is determined during the 2^(nd)iteration, and so on, and finally, tiling configuration for tensor 1 isdetermined during the N^(th) iteration.

Thus, after the N^(th) iteration of blocks 1216, 1220, and 1224, tilingdecisions for all the tensors for all the sections have been determined,and have updated within the graph metadata. Finally, during the N^(th)iteration of block 1220, index i is equal to 1 (e.g., “Yes” at 1220),and this implies that all tensors in individual sections have beenconsidered and corresponding tiling configurations have been determined.Accordingly, the method 1200 proceeds from 1220 to 1228. At 1228, thecompiler 106 compiles the processing graph, based on the graph metadata,to generate a configuration file that is configured in accordance withthe 1^(st), . . . , N^(th) tiling configuration for each section. Duringcompilation, the processing graph is modified, and the tilingconfigurations of various tensors within the processing graph areupdated based on the graph metadata.

Thus, the method 1200 discusses generating tiling configurations forvarious forward and backward sections of a processing graph, andcompiling the processing graph based on such tiling configurations. Forexample, a first section of the processing graph has a first topology oftiling configurations and a second section of the processing graph has asecond topology of tiling configurations. As seen in various figures(e.g., FIGS. 9B-10B), the first topology of tiling configurations andthe second topology of tiling configurations are different, as tensorsof the first and second sections are tiled differently.

In an example, tiling dependencies between successive sections in thesequence of the plurality of sections are decoupled, and tilingdependencies between successive layers are confined to layers within asection.

Once the configuration file corresponding to the processing graph isgenerated, the runtime logic 110 executes the application associatedwith the processing graph, e.g., using the configuration files generatedduring the compilation process at 1228.

Example Reconfigurable Processor

FIG. 13 is a simplified block diagram 1300 of components of a CGRA(Coarse-Grained Reconfigurable Architecture) processor, such as the dataprocessor 110 of FIG. 1. In this example, the CGRA processor has twotiles (Tile1, Tile2). The tile comprises an array of configurable unitsconnected to a bus system, including array level networks in thisexample. An array of configurable units the tile includes computationunits in hardware or by configuration of reconfigurable components. Thebus system includes a top-level network connecting the tiles to externalI/O interface 1305 (or any number of interfaces). In other embodiments,different bus system configurations may be utilized. The configurableunits in each tile are nodes on the array level network in thisembodiment.

Each of the tiles has four AGCUs (Address Generation and CoalescingUnits) (e.g., MAGCU1, AGCU9, AGCU13, AGCU14, and MAGCU2, AGCU22, AGCU23,AGCU24). The AGCUs are nodes on the top-level network and nodes on thearray level networks and include resources for routing data among nodeson the top-level network and nodes on the array level network in eachtile.

Nodes on the top-level network in this example include one or moreexternal I/Os, including interface 1305. The interfaces to externaldevices include resources for routing data among nodes on the top-levelnetwork and external devices, such as high-capacity memory, hostprocessors, other CGRA processors, FPGA devices and so on, that areconnected to the interfaces.

One of the AGCUs in a tile is configured in this example to be a masterAGCU (MAGCU), which includes an array configuration load/unloadcontroller for the tile. In other embodiments, more than one arrayconfiguration load/unload controller can be implemented, and one arrayconfiguration load/unload controller may be implemented by logicdistributed among more than one AGCU.

The MAGCU1 includes a configuration load/unload controller for Tile1,and MAGCU2 includes a configuration load/unload controller for Tile2. Inother embodiments, a configuration load/unload controller can bedesigned for loading and unloading configuration of more than one tile.In other embodiments, more than one configuration controller can bedesigned for configuration of a single tile. Also, the configurationload/unload controller can be implemented in other portions of thesystem, including as a stand-alone node on the top-level network and thearray level network or networks.

The top-level network is constructed using top-level switches (1311,1313, 1314, and 1316) connecting to each other as well as to other nodeson the top-level network, including the AGCUs, and I/O interface 2805.The top-level network includes links (e.g., L11, L9, L21, L22)connecting the top-level switches. Data travels in packets between thetop-level switches on the links, and from the switches to the nodes onthe network connected to the switches. For example, top-level switches1311 and 1312 are connected by a link L14, top-level switches 1314 and1315 are connected by a link L9, top-level switches 1311 and 1314 areconnected by a link L13, and top-level switches 1312 and 1313 areconnected by a link L21. The links can include one or more buses andsupporting control lines, including for example a chunk-wide bus (vectorbus). For example, the top-level network can include data, request andresponse channels operable in coordination for transfer of data in amanner analogous to an AXI compatible protocol. See, AMBA® AXI and ACEProtocol Specification, ARM.

Top-level switches can be connected to AGCUs. For example, top-levelswitches 1311, 1312, 1314, and 1315 are connected to MAGCU1, AGCU9,AGCU13 and AGCU14 in the tile Tile1, respectively. Top-level switches1312, 1313, 1315, and 1316 are connected to MAGCU2, AGCU22, AGCU23 andAGCU24 in the tile Tile2, respectively.

Top-level switches can be connected to one or more external I/Ointerfaces (e.g., interface 1305).

FIG. 14A is a simplified diagram of a tile and an array level networkusable in the configuration of FIG. 13, where the configurable units inthe array are nodes on the array level network and are configurable toimplement the processing graphs and various processing nodes of varioussections discussed herein.

In this example, the array of configurable units 1400 includes aplurality of types of configurable units, which are to execute thevarious processing nodes of various sections of processing graphsdiscussed herein. The types of configurable units in this example,include Pattern Compute Units (PCUs), Pattern Memory Units (PMUs),Switch units (S), and Address Generation and Coalescing Units (eachincluding two address generators AG and a shared CU). For an example ofthe functions of these types of configurable units, see, Prabhakar etal., “Plasticine: A Reconfigurable Architecture For Parallel Patterns,”ISCA '17, Jun. 24-28, 2017, Toronto, ON, Canada, which is incorporatedby reference as if fully set forth herein. In this example, the PCUs(e.g., 1442) and PMUs (e.g., 1443) in the array of configurable units1400 can include resources configurable for embodiment of a computationunit, an example configuration of which is described herein. Each ofthese configurable units contains a configuration store comprising a setof registers or flip-flops that represent either the setup or thesequence to run a program, and can include the number of nested loops,the limits of each loop iterator, the routes and/or instructions to beexecuted for each stage including stages, the source of the operands,and the network parameters for the input and output interfaces. Theconfiguration files to configure the configurable units are generatedusing method 1200 discussed herein. A configuration file in theconfiguration store contains a bit-stream representing the initialconfiguration, or starting state, of each of the components that executethe program. This bit-stream is referred to as a bit file.

The array level network includes links interconnecting configurableunits in the array. The links in the array level network include one ormore and, in this case, three kinds of physical buses: a chunk-levelvector bus (e.g., one hundred and twenty-eight bits of data), aword-level scalar bus (e.g., thirty-two bits of data), and a multiplebit-level control bus. For instance, interconnect 1421 between switchunits 1411 and 1412 includes a vector bus interconnect with a vector buswidth of one hundred and twenty-eight bits, a scalar bus interconnectwith a scalar bus width of thirty-two bits, and a control businterconnect.

The three kinds of physical buses differ in the granularity of databeing transferred. In one embodiment, the vector bus can carry a chunkthat includes sixteen-bytes (=one hundred and twenty-eight bits) of dataas its payload. The scalar bus can have a thirty-two-bit payload andcarry scalar operands or control information. In some machinesimplemented using this system, data can be represented using floatingpoint data formats, including standard or non-standard formats. Exampleformats include FP32 and BF16, among others. It can be understood thatthe number of data values carried on the scalar and vector buses is afunction of the encoding format of the data values, with FP32 utilizingthirty-two bits per value and BF16 using sixteen bits per value.

The control bus can carry control handshakes such as tokens and otherlines. The vector and scalar buses can be packet switched, includingheaders that indicate a destination of each packet and other informationsuch as sequence numbers that can be used to reassemble a file when thepackets are received out of order. Each packet header can contain adestination identifier that identifies the geographical coordinates ofthe destination switch unit (e.g., the row and column in the array), andan interface identifier that identifies the interface on the destinationswitch (e.g., North, South, East, West, etc.) used to reach thedestination unit. The control network can be circuit switched based ontiming circuits in the device, for example. The configurationload/unload controller can generate a header for each chunk ofconfiguration data of one hundred and twenty-eight bits. The header istransmitted on a header bus to each configurable unit in the array ofconfigurable unit.

FIG. 14B illustrates an example switch unit connecting elements in anarray level network. As shown in the example of FIG. 14B, a switch unitcan have eight interfaces. The North, South, East and West interfaces ofa switch unit are used for connections between switch units. TheNortheast, Southeast, Northwest and Southwest interfaces of a switchunit are each used to make connections to PCU or PMU instances. A set oftwo switch units in each tile quadrant have connections to an AddressGeneration and Coalescing Unit (AGCU) that include multiple AddressGeneration (AG) units and a Coalescing Unit (CU) connected to themultiple address generation units. The Coalescing Unit (CU) arbitratesbetween the AGs and processes memory requests. Each of the eightinterfaces of a switch unit can include a vector interface, a scalarinterface, and a control interface to communicate with the vectornetwork, the scalar network, and the control network.

During execution of a machine after configuration, data can be sent viaone or more unit switches and one or more links between the unitswitches to the configurable units using the vector bus and vectorinterface(s) of the one or more switch units on the array level network.

In embodiments described herein, a configuration file or bit file,before configuration of the tile, can be sent from the configurationload controller using the same vector bus, via one or more unit switchesand one or more links between the unit switches to the configurable unitusing the vector bus and vector interface(s) of the one or more switchunits on the array level network. For instance, a chunk of configurationdata in a unit file particular to a configurable unit PMU 2941 can besent from the configuration load/unload controller 1401 to the PMU 1441,via a link 1420 between the configuration load/unload controller 1401and the West (W) vector interface of the switch unit 1411, the switchunit 1411, and a link 1431 between the Southeast (SE) vector interfaceof the switch unit 141 land the PMU 1441.

In this example, one of the AGCUs is configured to be a master AGCU,which includes a configuration load/unload controller (e.g., 1401). Themaster AGCU implements a register through which the host (120, FIG. 1)can send commands via the bus system to the master AGCU. The master AGCUcontrols operations on an array of configurable units in a tile andimplements a program control state machine to track the state of thetile based on the commands it receives from the host through writes tothe register. For every state transition, the master AGCU issuescommands to all components on the tile over a daisy-chained command bus.The commands include a program reset command to reset configurable unitsin an array of configurable units in a tile, and a program load commandto load a configuration file to the configurable units.

Other Implementations

A first example of accelerated deep learning is using a deep learningaccelerator to train a neural network. A second example of accelerateddeep learning is using a deep learning accelerator to operate a trainedneural network to perform inferences. A third example of accelerateddeep learning is using a deep learning accelerator to train a neuralnetwork and subsequently perform inference with any one or more of thetrained neural networks, information from same, and a variant of same.

Examples of neural networks include Fully Connected Neural Networks(FCNNs), Recurrent Neural Networks (RNNs), Convolutional Neural Networks(CNNs), Long Short-Term Memory (LSTM) networks, autoencoders, deepbelief networks, and Generative Adversarial Networks (GANs).

An example of training a neural network is determining one or moreweights associated with the neural network, such as by hardwareacceleration via a deep learning accelerator. An example of making aninference is using a trained neural network to compute results byprocessing input data based on weights associated with the trainedneural network. As used herein, the term ‘weight’ is an example of a‘parameter’ as used in various forms of neural network processing. Forexample, some neural network learning is directed to determiningparameters that are then usable for performing neural network inferencesusing the parameters.

A neural network processes data according to a dataflow graph comprisinglayers of neurons. Stimuli (e.g., input data) are received by an inputlayer of neurons and the computed results of the dataflow graph (e.g.,output data) are provided by an output layer of neurons. Example layersof neurons include input layers, output layers, rectified linear unitlayers, fully connected layers, recurrent layers, long short-term memorylayers, convolutional layers, kernel layers, dropout layers, and poolinglayers. A neural network is conditionally and/or selectively trained,subject to hardware acceleration. After being trained, a neural networkis conditionally and/or selectively used for inference, subject tohardware acceleration.

An example of a deep learning accelerator is one or more relativelyspecialized hardware elements operating in conjunction with one or moresoftware elements to train a neural network and/or perform inferencewith a neural network relatively more efficiently than using relativelyless specialized hardware elements. Some implementations of therelatively specialized hardware elements include one or more hardwarelogic circuitry elements such as transistors, resistors, inductors,capacitors, wire interconnects, combinatorial logic (e.g., NAND, NOR)gates, latches, register files, memory arrays, tags for memory arrays,content-addressable memories, flash, ROM, DRAM, SRAM,Serializer/Deserializer (SerDes), I/O drivers, and the like, such asimplemented via custom logic, synthesized logic, ASICs, and/or FPGAs.Some of the relatively less specialized hardware elements includeconventional CPUs and conventional GPUs.

An example of storage is one or more elements enabled to retain stateinformation, e.g., any one or more of: a flip-flop, a latch or an arrayof latches, a register or an array of registers, a register file, amemory, a memory array, a magnetic storage device, an optical storagedevice, SRAM, DRAM, flash, and ROM. In various embodiments storage isvolatile (e.g., SRAM or DRAM) and/or non-volatile (e.g., flash or ROM).

An example of an Integrated Circuit (IC) is a collection of circuitryimplemented on one or more portions of semiconductor material, such as asingle die or a plurality of dice. An example of 3D-stacking of dice isproviding mechanical connectivity and/or electrical connectivity betweenthe dice, e.g., in a dimension orthogonal to a major surface of thedice, to form a unit. The mechanical connectivity and/or the electricalconnectivity are variously implemented, e.g., via one or more of solderballs, microbumps, and through-silicon vias. An example of 2.5D stackingof dice is providing mechanical connectivity and/or electricalconnectivity between the dice via a common element (e.g., a siliconinterposer) to form a unit, wherein the mechanical connectivity and/orelectrical connectivity between each die and the common substrate is ina dimension orthogonal to a major surface of the die. The mechanicalconnectivity and/or the electrical connectivity are variouslyimplemented, e.g., via one or more of solder balls, microbumps, andthrough-silicon vias. An example of an Application-Specific IntegratedCircuit (ASIC) is an IC designed for a particular use.

An example of a package is an element enabled to mechanically retainand/or contain one or more electronic circuits and/or to electricallyinterconnect one or more electronic circuits. Example electroniccircuits are any one or more of one or more portions of semiconductormaterial, one or more dice, one or more interposers, and one or moresubstrates. Particular examples of packages include a BGA package andvariants thereof. Some ICs comprise a package. An example of a substrateis an element to mechanically retain and/or electrically interconnectone or more dice and/or one or more packages. A particular example of asubstrate is a PCB to, e.g., retain and interconnect packages. Anotherparticular example of a substrate is a silicon interposer to, e.g.,couple one or more 3D-stacked or 2.5-stacked dice. Another particularexample of a substrate is a package, e.g., retaining a plurality ofdice.

A SmartNIC is a network interface card, or network adapter that operatesdirectly on data packets independent of host kernel resources andrunning an operating system networking stack resulting in lesscontention for the host processing resources, less network latency, andincreases in network data packet throughput. The SmartNIC accomplishesthis by offloading network stack processing tasks from the system hostCPU, acting as a coprocessor of sorts.

In the present context, a SmartNIC is a NIC equipped with a fullyprogrammable hardware implementation, supporting an operating systemconfigured for network processing tasks. The hardware implementation maycomprise System-on-Chip (SoC), FPGAs, ASICs, CGRAs, or otherprogrammable processor circuits such as the ARM family. A SmartNIC maysupport sets of specialized hardware functionalities accelerates aspecific class of functions (e.g., Open vSwitch data-plane) or toperform generic packet and flow-filtering, packet inspection, flow tableprocessing, encryption, RDMA, VXLAN overlays and NVMe-oF functionality.

A SmartNIC includes a host kernel-bypass logic for sending and receivingpackets to/from nodes and additional hosts. The SmartNIC may accomplishthis by providing a set of physical addresses comprising a shared memoryfor inputs and outputs. In one aspect, the reprogrammable processor maydirectly access sets of SmartNIC FIFO buffers using a combination ofhead and tail pointers as described supra to push and pull data, thusbypassing the host kernel and reducing at least one hop. A host may alsointerface directly to the SmartNIC by writing to a physical addresswithout requiring drivers to control the network flow, furtherincreasing theoretical throughput.

In one aspect, the SmartNIC may provide a configuration interface tospecify the physical addresses of a plurality of I/O shared memorybuffers comprising FIFO queues and mapping tables for memory regionscontaining packet buffers. In an additional aspect, the SmartNIC maycouple nodes, reprogrammable processors (RPs) and hosts to retrievepacket buffers from shared memory buffers and to transmit packet buffersfrom host, node, or RP DRAM to the SmartNIC shared memory buffers over anetwork.

The network fabric is an interface to a plurality of nodes and hosts.The SmartNIC provides connectivity between either a host and the networkor between a node and the network. A node comprises a plurality ofreprogrammable processors (RPs) and bypasses the host when interfacingto the SmartNIC. A SmartNIC may connect to a first physical/linkconnection over the network, coupling the SmartNIC with a host, node, orRP. The SmartNIC connects to a second physical/link connection, couplingthe SmartNIC to the network. The physical/link connections to thenetwork fabric interface may each be of any type, for instance,Ethernet, Fibre Channel, InfiniBand, PCIe, etc. A physical/linkconnection may also be a wireless medium. A SmartNIC includes MediaAccess Controllers (MACs) to interface with the physical/linkconnections to route data packets to the RPs and hosts.

An example SmartNIC may use an FPGA to implement the communicationsprotocols, e.g., Transport Control Protocol (“TCP”), used to performinternet routing and may comprise PCIe high-speed network interfaces,shared physical memory and an FPGA. The FPGA may implement the SmartNICcontroller as the bridge between a host, node, RP, and the network atthe “physical layer” to integrate directly into the data path. TheSmartNIC may further implement the Open System Interconnection (“OSI”)model, which is a conceptual model that characterizes and standardizesthe internal functions of a communication system by partitioning it intoabstraction layers. A physical abstraction layer defines electrical andphysical specifications between a device and a transmission medium, suchas a copper or fiber optical cable. This includes the layout of pins,voltages, line impedance, cable specifications, signal timing, hubs,repeaters, network adapters, host bus adapters and more. The majorfunctions and services performed by the physical layer include: (1)establishment and termination of a connection to a communicationsmedium; (2) contention resolution; (3) flow control; and (4) modulationto convert digital data in user equipment to the corresponding signalstransmitted over a communications channel. These are the signalsoperating over the physical cabling (such as copper and optical fiber)or over a radio link.

The network flows can be Transmission Control Protocol/Internet Protocol(TCP/IP) flows, for example. The SmartNICs may exchange network packetswith the nodes or hosts via a network/fabric comprising media/physicallinks and can exchange network packets with their respective nodes orhosts via host-facing media/physical links to the host NICs. Networkflows used by applications to exchange data may pass through theSmartNIC as follows. A host-based application may have application-layerdata to convey, for instance, a remote call invocation. The host remotecall invocation may comprise a command or data for passing through anoperating system Application Programming Interface (API) (e.g., a streamor socket) as a write to a physical address on the SmartNIC where itenters the network stack, The API writes the command or data into thephysical address of the shared memory FIFO and placed in one or moretransport packets (e.g., TCP/IP packets). Next, encapsulation oftransport packets to network packets (e.g., TCP/IP packets with thehost's Internet Protocol (IP) address as the sender). and then loadedinto one or more payloads of physical layer frames (e.g., Ethernetframes). The frames then pass through to the first physical/linkconnection of the network fabric. On a second SmartNIC, the aboveprocess is reversed where the network packets require decapsulation anddata eventually arrives at a physical address for the host, node, or RP.

The applications execute on the reconfigurable processors in adistributed fashion by programming the individual compute and memorycomponents and may asynchronously receive, process, and send data andcontrol information. In the reconfigurable processors, computation mayexecute as deep, nested dataflow pipelines that exploit nestedparallelism and data locality efficiently. These dataflow pipelinescontain several stages of computation, where each stage reads data fromone or more input buffers with an irregular memory access pattern,performs computations on the data while using one or more internalbuffers to store and retrieve intermediate results, and produces outputsthat are written to one or more output buffers. The structure of thesepipelines depends on the control and dataflow graph representing theapplication. Pipelines may arbitrarily nest and loop within each other.

The applications comprise high-level programs. A high-level program issource code written in programming languages like C, C++, Java,JavaScript, Python, and Spatial, for example, using deep learningframeworks like PyTorch, TensorFlow, ONNX, Caffe, and Keras. Thehigh-level program can implement computing structures and algorithms ofmachine learning models like AlexNet, VGGNet, GoogLeNet, ResNet,ResNeXt, RCNN, YOLO, SqueezeNet, SegNet, GAN, BERT, ELMo, USE,Transformer, and Transformer-XL. In one example, the high-level programcan implement a convolutional neural network with several processinglayers, such that each processing layer can include one or more nestedloops. The high-level program can execute irregular memory operationsthat involve accessing inputs and weights and performing matrixmultiplications between the inputs and the weights. The high-levelprogram can include nested loops with high iteration count and loopbodies that load and multiply input values from a preceding processinglayer with weights of a succeeding processing layer to produce an outputfor the succeeding processing layer. The high-level program can haveloop-level parallelism of the outermost loop body, which can beexploited using coarse-grained pipelining. The high-level program canhave instruction-level parallelism of the innermost loop body, which canbe exploited using loop unrolling, SIMD vectorization, and pipelining.

Regarding loops in the high-level programs of the applications, loopsdirectly nested in a loop body are termed the child loops of the outerparent loop. A loop is called an innermost loop if it does not have anychildren, i.e., there are no nested loops within its body. A loop is anoutermost loop if it does not have a parent, i.e., it is not nestedwithin another loop's body. An imperfectly nested loop has a body with amix of non-looping statements (e.g., primitive arithmetic, logical, andrelational operations) and one or more child loops. Parallelism in theimperfectly nested loops can be exploited at any or all loop levels, andin the operations that comprise loop bodies. Parallelism can occur inmultiple forms such as fine-grained and coarse-grained pipelineparallelism, data parallelism, and task parallelism.

In some implementations, a Software Development Kit (SDK) (or dataflowgraph generator) generates dataflow graphs of the high-level programs ofthe applications. The SDK transforms the input behavioral description ofthe high-level programs into an intermediate representation such as thedataflow graphs. This may include code optimization steps like falsedata dependency elimination, dead-code elimination, and constantfolding. The dataflow graphs encode the data and control dependencies ofthe high-level programs.

The dataflow graphs comprise nodes and edges. The nodes can representcompute operations and memory allocations. The edges can represent dataflow and control flow. In some implementations, each loop in thehigh-level programs can be represented as a controller in the dataflowgraphs. The dataflow graphs support branches, loops, function calls, andother variations of control dependencies. In some implementations, afterthe dataflow graphs are generated, additional analyses or optimizationsfocused on loop transformations can be performed, such as loopunrolling, loop pipelining, loop fission/fusion, and loop tiling.

The SDK also supports programming the reconfigurable processors in thepool of reconfigurable dataflow resources at multiple levels, forexample, from the high-level deep learning frameworks to C++ andassembly language. In some implementations, the SDK allows programmersto develop code that runs directly on the reconfigurable processors. Inother implementations, the SDK provides libraries that containpre-defined functions like linear algebra operations, element-wisetensor operations, non-linearities, and reductions required forcreating, executing, and profiling the dataflow graphs on thereconfigurable processors. The SDK communicates with the deep learningframeworks via Application Programming Interfaces (APIs).

The nodes in a dataflow graph represent operation units may configure tobe producers to produce tensors for execution of an application, and tobe consumers to consume the tensors for execution of the application.The producers and consumers asynchronously transmit data along dataconnections. A tensor includes one or more vectors.

A “compiler” transforms the dataflow graphs into a hardware-specificconfiguration, and specifies the configuration in an execution filegenerated by the compiler 106. In one implementation, the compilerpartitions the dataflow graphs into memory allocations and executionfragments, where these partitions are specified in the execution file.Execution fragments represent operations on data. An execution fragmentcan comprise portions of a program representing an amount of work. Anexecution fragment can comprise computations encompassed by a set ofloops, a set of graph nodes, or some other unit of work that requiressynchronization. An execution fragment can comprise a fixed or variableamount of work, as needed by the program. Different ones of theexecution fragments can contain different amounts of computation.Execution fragments can represent parallel patterns or portions ofparallel patterns and are executable asynchronously.

In some implementations, the partitioning of the dataflow graphs intothe execution fragments includes treating calculations within at leastone innermost loop of a nested loop of the dataflow graphs as a separateexecution fragment. In other implementations, the partitioning of thedataflow graphs into the execution fragments includes treatingcalculations of an outer loop around the innermost loop of the dataflowgraphs as a separate execution fragment. In the case of imperfectlynested loops, operations within a loop body up to the beginning of anested loop within that loop body are grouped together as a separateexecution fragment.

Memory allocations represent the creation of logical memory spaces inon-chip and/or off-chip memories for data required to implement thedataflow graphs, and these memory allocations are specified in theexecution file. Memory allocations define the type and the number ofhardware resources (functional units, storage, or connectivitycomponents). Main memory (e.g., DRAM) is off-chip memory for providingmemory allocations. Scratchpad memory (e.g., SRAM) is on-chip memory forproviding memory allocations. Other memory types for which the memoryallocations can be made for various access patterns and layouts includeread-only Look-Up Tables (LUTs), fixed size queues (e.g., FIFOs), andregister files.

The compiler binds memory allocations to virtual memory units and bindsexecution fragments to virtual compute units, and these bindings arespecified in the execution file. In some implementations, the compilerpartitions execution fragments into memory fragments and computefragments, and these partitions are specified in the execution file. Amemory fragment comprises address calculations leading up to a memoryaccess. A compute fragment comprises all other operations in the parentexecution fragment. In one implementation, each execution fragment isbroken up into a plurality of memory fragments and exactly one computefragment. In one implementation, the compiler performs the partitioningusing reverse dataflow analysis such that inputs to an address used in amemory access recursively flag until the compiler reaches eitherconstant values or (bound) loop/pattern iterators. A single executionfragment can produce one or more memory fragments, depending on how manymemory accesses exist in the original loop body. In cases where the samememory addressing logic is shared across multiple memory accesses,address calculation may be duplicated to create multiple memoryfragments from the same execution fragment.

The memory fragments of the execution fragments are configured to indexinto data structures. At least one of the memory fragments indexes intoa data structure in the logical memory spaces of one of the memoryallocations. Each compute and memory fragment preserves informationabout all loops whose loop bodies directly contain the operations in thecorresponding execution fragment. In one implementation, thiscorresponds to replicating the calculation of the loop iterators of eachloop into each compute and memory fragment. This replication allows eachfragment to preserve the same iterative behavior as the originalprogram, while also allowing distributed calculation of loop iterators.

The compiler translates the applications developed with commonly usedopen-source packages such as Keras and PyTorch into reconfigurableprocessor specifications. The compiler generates the configuration fileswith configuration data for the placed positions and the routed data andcontrol networks. In one implementation, this includes assigningcoordinates and communication resources of the physical memory andcompute units by placing and routing units onto the array of theprocessor while maximizing bandwidth and minimizing latency.

Clauses

A technology is described which uses buffers to efficiently stream databetween processors on a same processing node and on different processingnodes, which can be particularly applied to processors such as CentralProcessing Unit (CPUs), Graphics Processing Units (GPUs), FieldProgrammable Gate Arrays (FPGAs), Coarse-Grained ReconfigurableArchitectures (CGRAs), Application-Specific Integrated Circuits (ASICs),Application Specific Instruction-set Processor (ASIP), and DigitalSignal Processors (DSPs). The technology disclosed implements efficientdistributed computing by allowing accelerators (e.g., reconfigurableprocessors) attached to separate hosts to directly communicate with eachother via buffers.

The technology disclosed can be practiced as a system, method, orarticle of manufacture. One or more features of an implementation can becombined with the base implementation. Implementations that are notmutually exclusive are taught to be combinable. One or more features ofan implementation can be combined with other implementations. Thisdisclosure periodically reminds the user of these options. Omission fromsome implementations of recitations that repeat these options should notbe taken as limiting the combinations taught in the precedingsections—these recitations are hereby incorporated forward by referenceinto each of the following implementations.

One or more implementations and clauses of the technology disclosed orelements thereof can be implemented in the form of a computer product,including a non-transitory computer readable storage medium withcomputer usable program code for performing the method steps indicated.Furthermore, one or more implementations and clauses of the technologydisclosed or elements thereof can be implemented in the form of anapparatus including a memory and at least one processor that is coupledto the memory and operative to perform exemplary method steps. Yetfurther, in another aspect, one or more implementations and clauses ofthe technology disclosed or elements thereof can be implemented in theform of means for carrying out one or more of the method steps describedherein; the means can include (i) hardware module(s), (ii) softwaremodule(s) executing on one or more hardware processors, or (iii) acombination of hardware and software modules; any of (i)-(iii) implementthe specific techniques set forth herein, and the software modules arestored in a computer readable storage medium (or multiple such media).

The clauses described in this section can be combined as features. Inthe interest of conciseness, the combinations of features are notindividually enumerated and are not repeated with each base set offeatures. The reader will understand how features identified in theclauses described in this section can readily be combined with sets ofbase features identified as implementations in other sections of thisapplication. These clauses are not meant to be mutually exclusive,exhaustive, or restrictive; and the technology disclosed is not limitedto these clauses but rather encompasses all possible combinations,modifications, and variations within the scope of the claimed technologyand its equivalents.

Other implementations of the clauses described in this section caninclude a non-transitory computer readable storage medium storinginstructions executable by a processor to perform any of the clausesdescribed in this section. Yet another implementation of the clausesdescribed in this section can include a system including memory and oneor more processors operable to execute instructions, stored in thememory, to perform any of the clauses described in this section.

We disclose the following clauses:

Clause Set 1 (Tiling Configuration Calculation in Reverse Order andAdaptive Tiling)

1A. A data processing system, comprising:

compile time logic configured to

-   -   section a graph into a sequence of sections,    -   configure each section of the sequence of sections such that an        input layer of a section processes an input, one or more        intermediate layers of the corresponding section processes        corresponding one or more intermediate outputs, and a final        layer of the corresponding section generates a final output,        -   wherein the final output has a non-overlapping final tiling            configuration, the one or more intermediate outputs have            corresponding one or more overlapping intermediate tiling            configurations, and the input has an overlapping input            tiling configuration,    -   determine the various tiling configurations by starting from the        final layer and reverse traversing through the one or more        intermediate layers, and ending with the input layer.        2A. The data processing system of claim 1, wherein to determine        the various tiling configurations, the compile time logic is to:

determine the non-overlapping final tiling configuration of the finaloutput;

based on the non-overlapping final tiling configuration of the finaloutput, determine the one or more overlapping intermediate tilingconfigurations of the one or more intermediate outputs; and

based on the one or more overlapping intermediate tiling configurationsof the one or more intermediate outputs, determine the overlapping inputtiling configuration of the input.

3A. The data processing system of claim 1, wherein the compile timelogic is to determine the non-overlapping final tiling configuration ofthe final output, based on one or more of (i) a size of the input, (ii)a size of the final output, (iii) a number of layers in thecorresponding section, and/or (iv) respective processing logicsimplemented by respective layers in the corresponding section.4A. The data processing system of claim 1, wherein the compile timelogic is to determine the various tiling configurations of a firstsection independent of determining various tiling configurations of anadjacent second section.5A. The data processing system of claim 1, wherein an overlappingintermediate tiling configuration of an intermediate output indicates asize of individual intermediate tiles of a plurality of intermediatetiles in the intermediate output, and an amount of overlap betweenneighboring intermediate tiles in the plurality of intermediate tiles.6A. The data processing system of claim 1, wherein the overlapping inputtiling configuration of the input indicates a size of individual inputtiles of a plurality of input tiles in the input, and an amount ofoverlap between neighboring input tiles in the plurality of input tiles.7A. The data processing system of claim 1, wherein the non-overlappingfinal tiling configuration of the final output indicates a size ofindividual final output tiles of a plurality of final output tiles inthe final output.1. A data processing system, comprising:

compile time logic configured to

-   -   section a graph into a sequence of sections, the sequence of        sections including at least a first section and a second        section,    -   configure the first section with a first topology of tiling        configurations in which to tile inputs, intermediate outputs,        and final outputs of the first section, and    -   configure the second section with a second topology of tiling        configurations in which to tile inputs, intermediate outputs,        and final outputs of the second section,        -   wherein the first topology of tiling configurations is            different from the second topology of tiling configurations;            and

runtime logic configured with the compile time logic to

-   -   execute the first section to generate the inputs, intermediate        outputs, and final outputs of the first section in the first        topology of tiling configurations, and    -   execute the second section to generate the inputs, intermediate        outputs, and final outputs of the second section in the second        topology of tiling configurations.        2. The data processing system of claim 1, wherein the first        topology of tiling configurations is determined based on a        number of processing nodes in the first section.        3. The data processing system of claim 1, wherein the first        topology of tiling configurations is determined based on        respective processing logics implemented by respective        processing nodes in the first section.        4. The data processing system of claim 1, wherein the first        topology of tiling configurations is determined based on a size        of the inputs of the first section.        5. The data processing system of claim 1, wherein the first        topology of tiling configurations is determined based on a size        of the final outputs of the first section.        6. The data processing system of claim 1, wherein the second        topology of tiling configurations is determined based on a        number of processing nodes in the second section.        7. The data processing system of claim 1, wherein the second        topology of tiling configurations is determined based on        respective processing logics implemented by respective        processing nodes in the second section.        8. The data processing system of claim 1, wherein the second        topology of tiling configurations is determined based on a size        of the inputs of the second section.        9. The data processing system of claim 1, wherein the second        topology of tiling configurations is determined based on a size        of the final outputs of the second section.        10. The data processing system of claim 1, wherein the sequence        of sections includes at least a third section,

wherein the compile time logic is further configured to

-   -   configure the third section with a third topology of tiling        configurations in which to tile inputs, intermediate outputs,        and final outputs of the third section,        -   wherein the third topology of tiling configurations is            different from the first topology of tiling configurations            and the second topology of tiling configurations; and

wherein the runtime logic is further configured to

-   -   execute the third section to generate the inputs, intermediate        outputs, and final outputs of the third section in the third        topology of tiling configurations.        11. The data processing system of claim 1, wherein the third        topology of tiling configurations is determined based on a        number of processing nodes in the third section.        12. The data processing system of claim 1, wherein the third        topology of tiling configurations is determined based on        respective processing logics implemented by respective        processing nodes in the third section.        13. The data processing system of claim 1, wherein the third        topology of tiling configurations is determined based on a size        of the inputs of the third section.        14. The data processing system of claim 1, wherein the third        topology of tiling configurations is determined based on a size        of the final outputs of the third section.        15. The data processing system of claim 1, wherein the first        topology of tiling configurations includes respective tiling        configurations for the inputs, intermediate outputs, and final        outputs of the first section.        16. The data processing system of claim 1, wherein the second        topology of tiling configurations includes respective tiling        configurations for the inputs, intermediate outputs, and final        outputs of the second section.        17. The data processing system of claim 1, wherein the third        topology of tiling configurations includes respective tiling        configurations for the inputs, intermediate outputs, and final        outputs of the third section.        18. The data processing system of claim 1, wherein the graph is        a convolutional neural network, sections in the sequence of        sections are forward pass subgraphs, wherein the sections are        backward pass subgraphs, wherein the inputs, intermediate        outputs, and final outputs of the first section are image data,        wherein the inputs, intermediate outputs, and final outputs of        the second section are image data.        18A. The data processing system of claim 1, wherein the graph is        a convolutional neural network, wherein sections in the sequence        of sections are backward pass subgraphs, wherein the inputs,        intermediate outputs, and final outputs of the first section are        input gradients, and wherein the inputs, intermediate outputs,        and final outputs of the second section are input gradients.        19. A data processing system, comprising:

compile time logic configured to

-   -   section a graph into a sequence of sections, the sequence of        sections including a first section followed by a second section,    -   configure the first section to generate a first output in a        first target configuration in response to processing an input in        a first input configuration, and    -   configure the second section to generate a second output in a        second target configuration in response to processing the first        output in a second input configuration,        -   wherein the first target configuration is different from the            second target configuration; and

runtime logic configured with the compile time logic to execute theconfigured first section and the configured second section.

20. The data processing system of claim 19, wherein the first targetconfiguration tiles the first output into a first set of non-overlappingtiles, wherein the first input configuration tiles the input into afirst set of input overlapping tiles, and wherein the first set ofnon-overlapping tiles is generated by using tiles in the first set ofinput overlapping tiles as effective receptive fields.21. The data processing system of claim 20, wherein the compile timelogic is further configured to reverse traverse the first section todetermine the first input configuration as the effective receptivefields of tiles in the first set of non-overlapping tiles that satisfythe first target configuration.22. The data processing system of claim 21, wherein the first targetconfiguration is determined based on a number of processing nodes in thefirst section.23. The data processing system of claim 22, wherein the first targetconfiguration is determined based on respective processing logicsimplemented by respective processing nodes in the first section.24. The data processing system of claim 23, wherein the first targetconfiguration is determined based on a size of the input.25. The data processing system of claim 24, wherein the first targetconfiguration is determined based on a size of the first output.26. The data processing system of claim 19, wherein the compile timelogic is further configured to configure the first section to generatethe first output in the first target configuration in response toprocessing the input in the first input configuration and a firstintermediate output in a first intermediate configuration.27. The data processing system of claim 26, wherein the firstintermediate configuration tiles the first intermediate output into afirst set of intermediate overlapping tiles, wherein the first set ofintermediate overlapping tiles is generated by using the tiles in thefirst set of input overlapping tiles as effective receptive fields, andwherein the first set of non-overlapping tiles is generated by usingtiles in the first set of intermediate overlapping tiles as effectivereceptive fields.28. The data processing system of claim 27, wherein the compile timelogic is further configured to reverse traverse the first section todetermine the first intermediate configuration as the effectivereceptive fields of the tiles in the first set of non-overlapping tilesthat satisfy the first target configuration.29. The data processing system of claim 28, wherein the compile timelogic is further configured to configure the first section to pad theinput in a first input padding configuration, wherein the first inputpadding configuration cumulatively pads the input into a first paddedinput and leaves the first intermediate representation unpadded.30. The data processing system of claim 19, wherein the second targetconfiguration tiles the second output into a second set ofnon-overlapping tiles, wherein the second input configuration tiles thefirst output into a second set of input overlapping tiles, and whereinthe second set of non-overlapping tiles is generated by using tiles inthe second set of input overlapping tiles as effective receptive fields.31. The data processing system of claim 30, wherein the compile timelogic is further configured to reverse traverse the second section todetermine the second input configuration as the effective receptivefields of tiles in the second set of non-overlapping tiles that satisfythe second target configuration.32. The data processing system of claim 31, wherein the second targetconfiguration is determined based on a number of processing nodes in thesecond section.33. The data processing system of claim 32, wherein the second targetconfiguration is determined based on respective processing logicsimplemented by respective processing nodes in the second section.34. The data processing system of claim 33, wherein the second targetconfiguration is determined based on a size of the second set of inputoverlapping tiles.35. The data processing system of claim 35, wherein the second targetconfiguration is determined based on a size of the second output.36. The data processing system of claim 19, wherein the compile timelogic is further configured to configure the second section to generatethe second output in the second target configuration in response toprocessing the first output in the second input configuration and asecond intermediate output in a second intermediate configuration.37. The data processing system of claim 36, wherein the secondintermediate configuration tiles the second intermediate output into asecond set of intermediate overlapping tiles, wherein the second set ofintermediate overlapping tiles is generated by using the tiles in thesecond set of input overlapping tiles as effective receptive fields, andwherein the second set of non-overlapping tiles is generated by usingtiles in the second set of intermediate overlapping tiles as effectivereceptive fields.38. The data processing system of claim 37, wherein the compile timelogic is further configured to reverse traverse the second section todetermine the second intermediate configuration as the effectivereceptive fields of the tiles in the second set of non-overlapping tilesthat satisfy the second target configuration.39. The data processing system of claim 38, wherein the compile timelogic is further configured to configure the second section to pad thesecond set of input overlapping tiles in a second input paddingconfiguration, wherein the second input padding configurationcumulatively pads the second set of input overlapping tiles into asecond padded input and leaves the second intermediate representationunpadded, and wherein cumulative padding in the second padded inputcompensates for no padding in the second intermediate representation.40. The data processing system of claim 19, wherein sections in thesequence of sections are subgraphs.41. The data processing system of claim 1, wherein the graph is aconvolutional neural network, sections in the sequence of sections areforward pass subgraphs, wherein the first output, the input, and thesecond output are image data.42. The data processing system of claim 1, wherein the graph is aconvolutional neural network, wherein the sections are backward passsubgraphs, wherein the first output, the input, and the second outputare input gradients.43. A method comprising:

sectioning a graph into a sequence of sections, the sequence of sectionsincluding at least a first section followed by a second section;

configuring the first section to generate a first output in a firsttarget tiling configuration in response to processing a first input in afirst input tiling configuration; and

configuring the graph to reconfigure the first output in the firsttarget tiling configuration to a second input in a second input tilingconfiguration; and

configuring the second section to generate a second output in a secondtarget tiling configuration in response to processing the second inputin the second input tiling configuration.

44. The method of claim 43, further comprising:

executing the configured first section and the configured secondsection.

45. The method of claim 43, wherein the first target tilingconfiguration tiles the first output into a first set of non-overlappingtiles, wherein the first input tiling configuration tiles the firstinput into a first set of input overlapping tiles, and wherein the firstset of non-overlapping tiles is generated by using tiles in the firstset of input overlapping tiles as effective receptive fields.

Clause Set 2 (Resetting Overlap Factor to Zero at Section Boundaries)

1. A data processing system configured to receive a graph that includesa sequence of layers, wherein the sequence of layers starts with aninput layer and ends with an output layer and includes intermediatelayers between the input layer and the output layer, wherein one or morelayers in the sequence of layers is configured to generate tiles withoverlapping regions, comprising:

compile time logic configured to reconfigure the graph and generate areconfigured graph,

-   -   wherein the reconfigured graph is partitioned into a sequence of        subgraphs,    -   wherein each subgraph in the sequence of subgraphs includes a        sub-sequence of layers in the sequence of layers,    -   wherein respective subgraphs in the sequence of subgraphs are        configured with respective tiling configurations, and    -   wherein the subgraphs are configured to reset overlapping of        tiles to zero at each subgraph output; and

runtime logic configured with the compile time logic to execute thereconfigured graph.

2. The data processing system of claim 1, further configured to composenon-overlapping output tiles generated by a preceding subgraph in thesequence of subgraphs and generate a composed input for a succeedingsubgraph, wherein each output tile in the non-overlapping output tileshas a first tile size, and wherein the composed input is stored inmemory.3. The data processing system of claim 2, further configured to provideoverlapping input tiles from the composed input to the successive graphin the sequence of subgraphs that succeeds the preceding subgraph,wherein each input tile in the overlapping input tiles has a second tilesize that is different from the first tile size.4. The data processing system of claim 2, wherein the non-overlappingoutput tiles are image data.5. The data processing system of claim 2, wherein the non-overlappingoutput tiles are input gradients.6. The data processing system of claim 2, wherein the non-overlappingoutput tiles are weight gradients.7. The data processing system of claim 1, wherein the graph is aconvolutional neural network.8. The data processing system of claim 1, wherein layers in the sequenceof layers include convolution layers, max pooling layers, min poolinglayers, average pooling layers, non-linearity layers, normalizationlayers, dropout layers, concatenation layers, transpose convolutionlayers, fully connected layers, softmax layers, and/or loss layers.9. The data processing system of claim 1, wherein the subgraphs areforward pass graphs.10. The data processing system of claim 1, wherein the subgraphs arebackward pass graphs.11. The data processing system of claim 1, wherein respective subgraphsin the sequence of subgraphs are configured with respective tilingconfigurations to decouple the tiling dependencies between successivesubgraphs in the sequence of subgraphs and to confine the tilingdependencies to successive layers within the subgraphs.12. A method comprising:

compiling a processing graph to generate a reconfigured graph, thereconfigured graph comprising a plurality of sequential sections,

wherein each section comprises (i) an input layer, (ii) an output layer,and (iii) one or more intermediate layers between the input and outputlayers,

wherein for each section, an input tensor to the input layer hasoverlapping tiles, an output tensor output by the output layer hasnon-overlapping tiles, and at least one intermediate tensor output by atleast one of the intermediate layers has overlapping tiles; and

executing the reconfigured graph in a reconfigurable processor.

13. The method of claim 12, wherein for at least one section, at leastanother intermediate tensor output by at least another of theintermediate layers has non-overlapping tiles.14. The method of claim 12, further comprising:compiling the processing graph such that in the reconfigured graph, anoutput tensor of a preceding section comprising non-overlapping tiles isrecomposed into an input tensor of a succeeding section comprisingoverlapping tiles.15. The method of claim 12, wherein the non-overlapping output tiles areimage data.16. The method of claim 12, wherein the non-overlapping output tiles areinput gradients.17. The method of claim 12, wherein the non-overlapping output tiles areweight gradients.18. The method of claim 12, wherein the processing graph is aconvolutional neural network.19. The method of claim 12, wherein individual layers in individualsections include convolution layers, max pooling layers, min poolinglayers, average pooling layers, non-linearity layers, normalizationlayers, dropout layers, concatenation layers, transpose convolutionlayers, fully connected layers, softmax layers, and/or loss layers.20. The method of claim 12, wherein the sections are forward passsections.21. The method of claim 12, wherein the sections are backward passsections.

Clause Set 3 (Data Flow Logic)

1. A data processing system, comprising:

a host processor operatively coupled to host memory;

one or more reconfigurable processors, operatively coupled to processormemory and the host processor, configured to execute a sequence ofsubgraphs of a graph,

-   -   wherein successive subgraphs in the sequence of subgraphs        include a preceding subgraph and a succeeding subgraph,        -   wherein the preceding subgraph generates outputs that            contribute to inputs processed by the succeeding subgraph;            and

data flow logic, operatively coupled to the reconfigurable processorsand the processor memory, configured to

-   -   store tiled outputs of the preceding subgraph as a composed        input in the processor memory, and    -   make available parts of the composed input for processing by the        succeeding subgraph.        2. The data processing system of claim 1, wherein the tiled        outputs have a first tiling configuration, wherein the parts        have a second tiling configuration, and wherein the first tiling        configuration is different from the second tiling configuration.        3. The data processing system of claim 2, wherein the first        tiling configuration configures tiles in the tiled outputs to be        non-overlapping.        4. The data processing system of claim 3, wherein the second        tiling configuration configures the parts to be overlapping.        5. The data processing system of claim 1, wherein the composed        input includes padding.        6. The data processing system of claim 5, wherein only those        edges of the parts are padded that coincide with padded edges of        the composed input.        7. The data processing system of claim 1, wherein the graph is a        convolutional neural network, wherein the subgraphs are forward        pass subgraphs, wherein the subgraphs are backward pass        subgraphs, wherein the outputs, the inputs, the tiled outputs,        and the composed input are feature maps, wherein the outputs,        the inputs, the tiled outputs, and the composed input are input        gradients.        8. A data processing system, comprising:

runtime logic configured to

-   -   pad a first input into a first padded input, read a first set of        input tiles from the first padded input in a first input tiling        configuration, process the first set of input tiles through a        first section of a graph to generate a first set of output tiles        in a first target tiling configuration, and pad the first set of        output tiles to generate first set of padded output tiles; and    -   arrange tiles in the first set of padded output tiles into a        second input, read a second set of input tiles from the second        input in a second input tiling configuration, and process the        second set of input tiles through a second section of the graph        to generate a second set of output tiles in a second target        tiling configuration, and    -   wherein the first target tiling configuration is different from        the second input tiling configuration.        9. The data processor of claim 8, wherein the runtime logic is        further configured to:

pad the second set of output tiles to generate second set of paddedoutput tiles; and

arrange tiles in the second set of padded output tiles into a thirdinput, read a third set of input tiles from the third input in a thirdinput tiling configuration, and process the third set of input tilesthrough a third section of the graph to generate a third set of outputtiles in a third target tiling configuration that is different from thefirst target tiling configuration and/or the second input tilingconfiguration.

10. A data processing system, comprising:

data flow logic configured to

-   -   write an input to memory;    -   read a first set of overlapping tiles from the input, wherein        the first set of overlapping tiles is processed to generate a        first set of non-overlapping tiles;    -   write a composed input in the memory, wherein the composed input        is constructed by composing non-overlapping tiles in the first        set of non-overlapping tiles; and    -   read a second set of overlapping tiles from the composed input,        wherein the second set of overlapping tiles is processed to        generate a second set of non-overlapping tiles.        11. A data processing system, comprising:

data flow logic configured to

-   -   write an input in memory, wherein all edges of the input are        padded; and    -   read a first set of tiles from the input, wherein tiles in the        first set of tiles have padding on only those edges that        coincide with padded edges of the input.        12. A data processing system, comprising:

data flow logic configured to

-   -   write a composed input in memory, wherein the composed input is        constructed by composing tiles in a first of set of tiles,        wherein the tiles in the first of set of tiles have a first        tiling configuration; and    -   read a second set of tiles from the composed input, wherein        tiles in the second set of tiles have a second tiling        configuration, and        -   wherein the first tiling configuration is different from the            second tiling configuration.            13. The data processing system of claim 12, wherein the            first tiling configuration configures each of the tiles in            the first of set of tiles to be non-overlapping and to have            a first tile size.            14. The data processing system of claim 12, wherein the            second tiling configuration configures each of the tiles in            the second set of tiles to be overlapping and to have a            second tile size.            15. A data processing system, comprising:

runtime logic configured to

-   -   cause a first section of a graph to generate a first plurality        of tiles of a tensor, wherein a combination of the first        plurality of tiles has a first size;    -   initialize a memory area having a second size to zeros, where        the second size is larger than the first size;    -   write the first plurality of tiles in the zero-initialized        memory area, such that a zero padding is formed around edges of        the first plurality of tiles written to the zero-initialized        memory area, wherein a total width of the zero padding is based        on a width difference between the second and first sizes;    -   subsequent to writing the first plurality of tiles, retile the        combination of the first plurality of tiles and the zero        padding, to generate a second plurality of tiles; and    -   cause a second section of the graph to process the second        plurality of tiles.        16. The data processing system of claim 15, wherein the first        plurality of tiles comprises a plurality of non-overlapping        tiles.        17. The data processing system of claim 15, wherein the second        plurality of tiles comprises a plurality of overlapping tiles.        18. The data processing system of claim 15, wherein a tile size        of each tile of the second plurality of tiles is larger than a        tiles size of each tile of the first plurality of tiles.        19. The data processing system of claim 15, wherein:        the tensor comprising the first plurality of tiles is a first        tensor;        the second plurality of tiles form a second tensor that is        larger in size than the first tensor.        20. The data processing system of claim 15, wherein the runtime        logic is configured to write the first plurality of tiles in the        zero-initialized memory area by serially writing individual        tiles of the first plurality of tiles in the zero-initialized        memory area.

Clause Set 4 (Section Boundaries)

1. A data processing system, comprising:

compile time logic configured to

-   -   section a graph into a sequence of sections, the sequence of        sections including at least a first section and a second        section,    -   configure the first section to generate a first set of output        tiles in a first target tiling configuration in response to        processing a first set of input tiles in a first input tiling        configuration, and    -   configure the second section to generate a second set of output        tiles in a second target tiling configuration in response to        processing the first set of output tiles in a second input        tiling configuration,        -   wherein the first target tiling configuration is different            from the second input tiling configuration; and

runtime logic configured with the compile time logic to

-   -   pad a first input into a first padded input, read the first set        of input tiles from the first padded input in the first input        tiling configuration, and process the first set of input tiles        through the first section to generate the first set of output        tiles in the first target tiling configuration, and    -   arrange tiles in the first set of output tiles into a second        padded input, read a second set of input tiles from the second        padded input in the second input tiling configuration, and        process the second set of input tiles through the second section        to generate the second set of output tiles in the second target        tiling configuration.        2. The data processing system of claim 1, wherein the first        input tiling configuration configures each of the tiles in the        first set of input tiles to be overlapping and to have a first        tile size.        3. The data processing system of claim 2, wherein the first        target tiling configuration configures each of the tiles in the        first set of output tiles to be non-overlapping and to have a        second tile size.        4. The data processing system of claim 1, wherein the second        input tiling configuration configures each of the tiles in the        first set of output tiles to be overlapping.        5. The data processing system of claim 1, wherein the second        target tiling configuration configures each of the tiles in the        second set of output tiles to be non-overlapping.        6. The data processing system of claim 1, wherein the first        input tiling configuration configures tiles in the first set of        input tiles to have padding on only those edges that coincide        with edges of the first padded input.        7. The data processing system of claim 1, wherein the second        input tiling configuration configures tiles in the second set of        input tiles to have padding on only those edges that coincide        with edges of the second padded input.        8. The data processing system of claim 1, further comprising:

data flow logic,

wherein to arrange tiles in the first set of output tiles into thesecond padded input, the runtime logic is configured to:

cause the data flow logic to write the first set of output tiles, withpadding around a periphery of the first set of output tiles, and

rearrange the first set of output tiles and the padding to generate thesecond padded input.

9. The data processing system of claim 1, wherein to arrange tiles inthe first set of output tiles into the second padded input, the runtimelogic is configured to:

initialize an area of a memory with zeros, wherein the area of thememory has (i) a first section and (ii) a second section around thefirst section;

cause a data flow logic of the data processing system to write the firstset of output tiles in the first section of the zero-initialized memory,such that the zeros in the second section form a zero-padding around thefirst section in which the first set of output tiles are written; and

retile the combination of the first set of output tiles in the firstsection and the zeros in the second section, to generate the second setof input tiles of the second padded input.

9A. The data processing system of claim 1, wherein the runtime logic isconfigured to concatenate the tiles in the first set of output tiles,when writing the tiles in the first set of output tiles in the firstsection of the zero-initialized memory.10. The data processing system of claim 9, wherein the second set ofinput tiles have zero-padding on only those edges that coincide withedges of the second padded input.11. The data processing system of claim 9, wherein:

the runtime logic is further configured to use on-chip processingelements to process the first set of input tiles through the firstsection to generate the first set of output tiles; and

the memory is in a chip that also includes the on-chip processingelements.

12. The data processing system of claim 9, wherein:

the runtime logic is further configured to use on-chip processingelements to process the first set of input tiles through the firstsection to generate the first set of output tiles; and

the memory is in a first chip that is different from a second chipincluding the on-chip processing elements.

13. The data processing system of claim 1, wherein processing nodes inindividual sections include convolution nodes, max pooling nodes, minpooling nodes, average pooling nodes, non-linearity nodes, normalizationnodes, dropout nodes, concatenation nodes, transpose convolution nodes,fully connected nodes, softmax nodes, and/or loss nodes.13a. The data processing system of claim 9, wherein to write the firstset of output tiles in the first section of the zero-initialized memory,the data flow logic is configured to:

read individual ones of the first set of output tiles from an on-chipprocessing element and write individual ones of the first set of outputtiles into an on-chip memory; and

read individual ones of the first set of output tiles from the on-chipmemory and write individual ones of the first set of output tiles intothe memory having the area initialized to zero, wherein the memory is anoff-chip memory.

14. The data processing system of claim 9, wherein to write the firstset of output tiles in the first section of the zero-initialized memory,the data flow logic is configured to:

read individual ones of the first set of output tiles from an on-chipprocessing element and write individual ones of the first set of outputtiles into the memory having the area initialized to zero, wherein thememory is an off-chip memory.

15. The data processing system of claim 9, wherein to write the firstset of output tiles in the first section of the zero-initialized memory,the data flow logic is configured to:

parallelly write tiles of the first set of output tiles to the memory.

16. The data processing system of claim 9, wherein to write the firstset of output tiles in the first section of the zero-initialized memory,the data flow logic is configured to:

serially write tiles of the first set of output tiles to the memory.

17. The data processing system of claim 1, further comprising:

data flow logic configured to

-   -   read the second set of input tiles of the second padded input in        the second input tiling configuration from an off-chip memory,

write the second set of input tiles of the second padded input in thesecond input tiling configuration to an on-chip memory,

read the second set of input tiles of the second padded input in thesecond input tiling configuration from the on-chip memory,

write the second set of input tiles of the second padded input in thesecond input tiling configuration to an on-chip processing elementconfigured to at least in part process the second set of input tiles.

18. The data processing system of claim 1, further comprising:

data flow logic configured to

-   -   read the first set of output tiles from an on-chip processing        element and write the first set of output tiles to an on-chip        memory; and

read the first set of output tiles from the on-chip memory and write thefirst set of output tiles to an off-chip memory.

19. The data processing system of claim 18, wherein the data flow logicis configured to use direct memory access (DMA) engines to read from andwrite into the off-chip memory.20. The data processing system of claim 19, wherein the DMA engines areon-chip engines.21. The data processing system of claim 18, wherein the off-chip memoryis dynamic random access memory (DRAM) and/or random access memory(RAM).22. The data processing system of claim 18, wherein the on-chip memoryis static random access memory (SRAM), block random access memory(BRAM), and/or dynamic random access memory (DRAM).23. The data processing system of claim 1, wherein the runtime logic isfurther configured to access the second set of input tiles in arow-major form.24. The data processing system of claim 1, wherein the runtime logic isfurther configured to access the second set of input tiles in acolumn-major form.25. The data processing system of claim 1, wherein sections in thesequence of sections are subgraphs partitioned from the graph.26. The data processing system of claim 25, wherein the sections areprocessing layers of a subgraph.27. The data processing system of claim 26, wherein the sections areprocessing nodes of a processing layer.28. The data processing system of claim 1, wherein the graph is aconvolutional neural network.29. The data processing system of claim 28, wherein processing nodes inthe convolutional neural network include convolution nodes, max poolingnodes, min pooling nodes, average pooling nodes, non-linearity nodes,normalization nodes, dropout nodes, concatenation nodes, transposeconvolution nodes, fully connected nodes, softmax nodes, and/or lossnodes.30. The data processing system of claim 1, wherein the sections areforward pass subgraphs.31. The data processing system of claim 1, wherein the first set ofoutput tiles, the first set of input tiles, the second set of outputtiles, the first padded input, the second input, the second paddedinput, the second set of input tiles, and the second set of output tilesare image data.32. A non-transitory computer readable storage medium impressed withcomputer program instructions, the instructions, when executed on aprocessor, implement a method comprising:

generating by an output processing node of a first section of aprocessing graph, a plurality of output tiles of an output tensor;

writing the plurality of output tiles of the output tensor in a memory,wherein the writing comprises zero-padding the plurality of output tilesof the output tensor in the memory;

tiling the zero-padded plurality of output tiles of the output tensor togenerate a plurality of input tiles of an input tensor; and

processing the plurality of input tiles of the input tensor in a secondsection of the processing graph.

33. The non-transitory computer readable storage medium of claim 32,further comprising:

initializing a plurality of memory locations to zero, the plurality ofmemory locations including (i) a first subset of memory locations, and(ii) a second subset of memory locations surrounding the first subset ofmemory locations,

wherein writing the plurality of output tiles comprises writing theplurality of output tiles of the output tensor in the first subset ofmemory locations in the memory, wherein the plurality of output tiles inthe first subset of memory locations is surrounded by zeros in thesecond subset of memory locations.

34. The non-transitory computer readable storage medium of claim 33,wherein tiling the zero-padded plurality of output tiles of the outputtensor comprises:

tiling a combination of (i) the plurality of output tiles of the outputtensor in the first subset of memory locations and (ii) the zeros in thesecond subset of memory locations surrounding the plurality of outputtiles of the output tensor.

35. The non-transitory computer readable storage medium of claim 32,wherein:

one or more first input tiles of the plurality of input tiles of theinput tensor have zero padding along one or more edges, and one or moresecond input tiles of the plurality of input tiles of the input tensordo not have zero padding along any edge.

36. The non-transitory computer readable storage medium of claim 35,wherein:

the one or more first input tiles of the plurality of input tiles of theinput tensor have zero padding along those edges that coincide withedges of the input tensor.

37. The non-transitory computer readable storage medium of claim 32,wherein:

the plurality of output tiles of the output tensor is non-overlappingtiles; and

the plurality of input tiles of the input tensor is overlapping tiles.

38. A computer implemented method comprising:

compiling a processing graph, wherein compiling the processing graphcomprises:

-   -   sectioning the processing graph into a sequence of sections, the        sequence of sections including at least a first section and a        second section,        -   configuring the first section to generate a first set of            output tiles in a first target tiling configuration in            response to processing a first set of input tiles in a first            input tiling configuration, and        -   configuring the second section to generate a second set of            output tiles in a second target tiling configuration in            response to processing a second set of input tiles in a            second input tiling configuration; and

executing the compiled processing graph, comprising:

-   -   generating the second set of input tiles in the second input        tiling configuration from the first set of output tiles in the        first target tiling configuration, the second input tiling        configuration different from the first target tiling        configuration.        40. The method of claim 38, wherein generating the second set of        input tiles from the first set of output tiles comprises:

zero-padding the first set of output tiles; and

tiling the zero-padded first set of output tiles, to generate the secondset of input tiles in the second input tiling configuration.

Clause Set 5 (Section Cuts)

1. A data processing system configured to receive a graph that includesa sequence of layers, comprising:

compile time logic configured to execute graph cuts to partition thegraph into a sequence of subgraphs,

-   -   wherein each subgraph in the sequence of subgraphs includes a        sub-sequence of layers in the sequence of layers, and    -   wherein a graph cut is executed between a preceding layer (l) in        the graph and a succeeding layer (l+1) in the graph that        succeeds the preceding layer,        -   wherein the preceding layer is configured to generate a set            of tiles on a tile-by-tile basis, and        -   wherein the succeeding layer is configured to process as an            aggregate information that spans multiple tiles in the set            of tiles; and

runtime logic configured with the compile time logic to execute thesequence of subgraphs.

2. The data processing system of claim 1, wherein the succeeding layerimplements a batch normalization operation.3. The data processing system of claim 1, wherein the succeeding layerimplements a reduction operation.4. The data processing system of claim 3, wherein the reductionoperation is a pooling operation.5. The data processing system of claim 3, wherein the reductionoperation is a convolution.6. The data processing system of claim 1, wherein tiles in the set oftiles are images tiles, wherein the information is pixels.7. The data processing system of claim 6, further configured to composethe image tiles into a composed image, and store the composed image.8. The data processing system of claim 7, further configured to providethe pixels from the composed image to the succeeding layer.9. The data processing system of claim 7, wherein the composed image isstored in off-chip memory attached to a chip.10. The data processing system of claim 7, wherein the composed image isstored in on-chip memory.11. The data processing system of claim 7, wherein the composed imageincludes padding.12. The data processing system of claim 11, wherein only those edges ofthe information are padded that coincide with padded edges of thecomposed image.13. The data processing system of claim 1, wherein the tiles are featuremap tiles, wherein the information is features.14. The data processing system of claim 13, further configured tocompose the feature map tiles into a composed feature map, and store thecomposed feature map.15. The data processing system of claim 14, further configured toprovide the features from the composed feature map to the succeedinglayer.16. The data processing system of claim 14, wherein the composed featuremap is stored in off-chip memory attached to a chip.17. The data processing system of claim 14, wherein the composed featuremap is stored in on-chip memory.18. The data processing system of claim 14, wherein the composed featuremap includes padding.19. The data processing system of claim 18, wherein only those edges ofthe information are padded that coincide with padded edges of thecomposed feature map.20. The data processing system of claim 1, wherein the tiles aregradient map tiles, wherein the information is gradients.21. The data processing system of claim 20, wherein the gradients areinput gradients.22. The data processing system of claim 20, further configured tocompose the gradient map tiles into a composed gradient map, and storethe composed gradient map.23. The data processing system of claim 23, further configured toprovide the gradients from the composed gradient map to the succeedinglayer.25. The data processing system of claim 23, wherein the composedgradient map is stored in off-chip memory attached to a chip.26. The data processing system of claim 21, wherein the composedgradient map is stored in on-chip memory.27. The data processing system of claim 23, wherein the composedgradient map includes padding.28. The data processing system of claim 27, wherein only those edges ofthe information are padded that coincide with padded edges of thecomposed gradient map.29. The data processing system of claim 1, wherein the preceding layeris configured as a final layer of a preceding subgraph in the sequenceof subgraphs.30. The data processing system of claim 29, wherein the succeeding layeris configured as a first layer of a succeeding subgraph in the sequenceof subgraphs that succeeds the preceding subgraph.31. The data processing system of claim 1, wherein the graph is aconvolutional neural network.32. The data processing system of claim 1, wherein the subgraphs areforward pass subgraphs.33. The data processing system of claim 1, wherein the subgraphs arebackward pass subgraphs.34. The data processing system of claim 1, wherein layers in thesequence of layers include convolution layers, max pooling layers, minpooling layers, average pooling layers, non-linearity layers,normalization layers, dropout layers, concatenation layers, transposeconvolution layers, fully connected layers, softmax layers, and/or losslayers.

Clause Set 6 (Read-Modify-Write in Backward Pass)

1. A data processing system, comprising:

compile time logic configured to

-   -   section a graph into a sequence of subgraphs, the sequence of        subgraphs including at least a first subgraph, and    -   configure the first subgraph to generate a plurality of output        tiles of an output tensor; and

runtime logic configured with the compile time logic to execute thesequence of subgraphs to

-   -   generate, at the output of the first subgraph, the plurality of        output tiles of the output tensor, and    -   write the plurality of output tiles in a memory in an        overlapping configuration, wherein an overlapping region between        any two neighboring output tiles of the plurality of output        tiles comprises a summation of a corresponding region of a first        neighboring output tile and a corresponding region of a second        neighboring output tile.        2. The data processing system of claim 1, wherein to write the        plurality of output tiles in the memory in the overlapping        configuration, the first subgraph is to:

initialize an area of the memory to first data that comprises all zeros;

generate a first output tile of the plurality of output tiles, read thefirst data comprising all zeros from the area of the memory, add thefirst output tile to a first section of the first data to generatesecond data, and write the second data to the area of the memory; and

generate a second output tile of the plurality of output tiles, read thesecond data from the area of the memory, add the second output tile to asecond section of the second data to generate third data, and write thethird data to the memory,

wherein the first section and the second section have a firstoverlapping region that includes data from both the first output tileand the second output tile.

3. The data processing system of claim 2, wherein first overlappingregion is a summation of a first portion of the first output tile and asecond portion of the second output tile.4. The data processing system of claim 2, wherein to write the pluralityof output tiles in the memory in the overlapping configuration, thefirst subgraph is further to:

generate a third output tile of the plurality of output tiles, read thethird data from the area of the memory, add the third output tile to athird section of the third data to generate fourth data, and write thefourth data to the area of the memory,

wherein the first section and the third section have a secondoverlapping region that includes data from both the first output tileand the third output tile.

5. The data processing system of claim 4, wherein the first section, thesecond section, and the third section have a third overlapping regionthat includes data from each of the first output tile, the second outputtile, and the third output tile.6. The data processing system of claim 5, the third overlapping regionis a summation of a portion of the first output tile, a portion of thesecond output tile, and a portion of the third output tile.7. The data processing system of claim 1, wherein:

the corresponding region of the first neighboring output tile is a firstportion, and not an entirety, of the first neighboring output tile thatoverlaps with a first portion of the second neighboring output tile; and

the corresponding region of the second neighboring output tile is thefirst portion, and not an entirety, of the second neighboring outputthat overlaps with the first portion of the first neighboring outputtile.

8. The data processing system of claim 7, wherein:

a second portion of the first neighboring output tile, which does notoverlap with any other neighboring output tile, is stored without beingsummed with any neighboring output tile; and

a second portion of the second neighboring output, which does notoverlap with any other neighboring output tile, is stored without beingsummed with any neighboring output tile.

9. The data processing system of claim 1, wherein an overlapping regionbetween any three neighboring output tiles of the plurality of outputtiles comprises a summation of the corresponding region of the firstneighboring output tile, the corresponding region of the secondneighboring output tile, and a corresponding region of a thirdneighboring output tile.10. The data processing system of claim 1, wherein an overlapping regionbetween any four neighboring output tiles of the plurality of outputtiles comprises a summation of the corresponding region of the firstneighboring output tile, the corresponding region of the secondneighboring output tile, a corresponding region of a third neighboringoutput tile, and a corresponding region of a fourth neighboring outputtile.11. The data processing system of claim 1, wherein the subgraphs arebackward pass subgraphs.12. The data processing system of claim 1, wherein the sequence ofsubgraphs includes a second subgraph that is immediate adjacent to thefirst subgraph, and wherein the runtime logic configured with thecompile time logic is to execute the sequence of subgraphs to:

retile the plurality of output tiles in the memory to generate aplurality of non-overlapping input tiles of an input tensor; and

execute the second subgraph to receive and process the plurality ofnon-overlapping input tiles of the input tensor.

13. The data processing system of claim 12, wherein:

the output tensor comprises (i) a central region and (ii) peripheralregion surrounding the central region and forming a border around thecentral region; and

the central region of the output tensor is tiled to generate theplurality of non-overlapping input tiles of the input tensor, and theperipheral region of the output tensor is not included in the pluralityof non-overlapping input tiles of the input tensor.

14. A computer implemented method comprising:

writing, in a memory and in an overlapping configuration, a plurality ofoutput tiles of an output tensor generated by a first subgraph of aprocessing graph, wherein an overlapping region between any twoneighboring output tiles of the plurality of output tiles comprises anaggregate of a corresponding region of a first neighboring output tileand a corresponding region of a second neighboring output tile;

tiling at least a section of the output tensor to generate a pluralityof non-overlapping input tiles of an input tensor; and

processing the plurality of non-overlapping input tiles of the inputtensor by a second subgraph of the processing graph.

15. The method of claim 14, wherein the output tensor has (i) a centralregion and (ii) a peripheral region surrounding the central region, andwherein tiling the output tensor comprises:

tiling the central region of the output tensor to generate the pluralityof non-overlapping input tiles of the input tensor, wherein theperipheral region of the output tensor is not included in the pluralityof non-overlapping input tiles of the input tensor.

16. The method of claim 15, wherein the peripheral region of the outputtensor is not processed by the second subgraph of the processing graph.17. The method of claim 14, wherein:

a number of output tiles in the plurality of output tiles of the outputtensor is same as a number of input tiles in the plurality of inputtiles of the input tensor; and

a size of each output tile in the plurality of output tiles of theoutput tensor is same;

a size of each input tile in the plurality of input tiles of the inputtensor is same; and

the size of each output tile in the plurality of output tiles of theoutput tensor is larger than the size of each input tile in theplurality of input tiles of the input tensor.

18. The method of claim 14, wherein the first and second subgraphs arebackward pass subgraphs.19. A non-transitory computer readable storage medium impressed withcomputer program instructions, the instructions, when executed on aprocessor, implement a method comprising:

generating, by a first subgraph of a processing graph, a plurality ofoverlapping output tiles of an output tensor;

tiling a first section of the output tensor to generate a plurality ofnon-overlapping input tiles of an input tensor, wherein a second sectionof the output tensor is not included in the plurality of non-overlappinginput tiles of the input tensor; and

processing the plurality of non-overlapping input tiles of the inputtensor by a second subgraph of the processing graph.

20. The non-transitory computer readable storage medium of claim 19,wherein the second section of the output tensor forms a boundary aroundthe first section of the output tensor.

Clause Set 7 (Full Materialization of Tensors)

1. A data processing system, comprising:

a plurality of reconfigurable processors;

processor memory operatively coupled to the plurality of reconfigurableprocessors; and

runtime logic, operatively coupled to the plurality of reconfigurableprocessors and the processor memory, configured to

-   -   configure at least one reconfigurable processor in the plurality        of reconfigurable processors with a first subgraph in a sequence        of subgraphs of a graph;    -   load an input onto the processor memory;    -   on a tile-by-tile basis, process a first set of input tiles from        the input through the first subgraph and generate a first set of        intermediate tiles, load the first set of intermediate tiles        onto the processor memory, and process the first set of        intermediate tiles through the first subgraph and generate a        first set of output tiles;    -   compose output tiles in the first set of output tiles into a        first composed input, and load the first composed input onto the        processor memory;    -   configure at least one reconfigurable processor in the plurality        of reconfigurable processors with a second subgraph in the        sequence of subgraphs;    -   on the tile-by-tile basis, process a second set of input tiles        from the first composed input through the second subgraph and        generate a second set of intermediate tiles, load the second set        of intermediate tiles onto the processor memory, and process the        second set of intermediate tiles through the second subgraph and        generate a second set of output tiles; and    -   compose output tiles in the second set of output tiles into a        second composed input, and load the second composed input onto        the processor memory.        2. The data processing system of claim 1, wherein the runtime        logic is further configured to:

configure at least one reconfigurable processor in the plurality ofreconfigurable processors with a third subgraph in the sequence ofsubgraphs;

on the tile-by-tile basis, process a third set of input tiles from thesecond composed input through the third subgraph and generate a thirdset of intermediate tiles, load the third set of intermediate tiles ontothe processor memory, and process the third set of intermediate tilesthrough the third subgraph and generate a third set of output tiles; and

compose output tiles in the third set of output tiles into a thirdcomposed input, and load the third composed input onto the processormemory.

3. The data processing system of claim 2, wherein the first set of inputtiles have overlapping regions, wherein the first set of intermediatetiles have overlapping regions, and wherein the first set of outputtiles are non-overlapping.4. The data processing system of claim 3, wherein tiles in the first setof intermediate tiles share overlapping regions with adjacent tiles inthe first set of intermediate tiles, wherein the overlapping regions areredundantly localized in each of the tiles for storage and futuretile-by-tile by processing to configure an individual tile in the firstset of intermediate tiles to be read with a contained overlapping regionwithout having to read the contained overlapping region from anotheradjacent tile in the first set of intermediate tiles sharing thecontained overlapping region with the individual tile.5. The data processing system of claim 4, wherein the second set ofinput tiles have overlapping regions, wherein the second set ofintermediate tiles have overlapping regions, and wherein the second setof output tiles are non-overlapping.6. The data processing system of claim 5, wherein tiles in the secondset of intermediate tiles share overlapping regions with adjacent tilesin the second set of intermediate tiles, wherein the overlapping regionsare redundantly localized in each of the tiles for storage and futuretile-by-tile by processing to configure an individual tile in the secondset of intermediate tiles to be read with a contained overlapping regionwithout having to read the contained overlapping region from anotheradjacent tile in the second set of intermediate tiles sharing thecontained overlapping region with the individual tile.7. The data processing system of claim 1, wherein the graph is aconvolutional neural network.8. The data processing system of claim 1, wherein the subgraphs asforward pass subgraphs.9. The data processing system of claim 1, wherein the subgraphs asbackward pass subgraphs.10. The data processing system of claim 1, wherein the input, the firstset of input tiles, the first set of intermediate tiles, first set ofoutput tiles, the first composed input, the second set of input tiles,the second set of intermediate tiles, the second set of output tiles,the second composed input, the third set of input tiles, the third setof intermediate tiles, the third set of output tiles, and the thirdcomposed input are image data.11. The data processing system of claim 1, wherein the input, the firstset of input tiles, the first set of intermediate tiles, first set ofoutput tiles, the first composed input, the second set of input tiles,the second set of intermediate tiles, the second set of output tiles,the second composed input, the third set of input tiles, the third setof intermediate tiles, the third set of output tiles, and the thirdcomposed input are input gradients.

Clause Set 8 (Graph Metadata Generation: Tiling, Padding, andZeroing-Out Configurations)

1. A data processing system configured to receive a processing graph ofan application, the processing graph having a sequence of processingnodes, the sequence of processing nodes including an input processingnode followed by at least one intermediate processing node and at leastone output processing node, the input processing node configured toprocess an input and generate at least one intermediate representationof the input, the intermediate processing node configured to process theintermediate representation and generate at least one furtherintermediate representation of the input, and the output processing nodeconfigured to process the further intermediate representation andgenerate at least one output representation of the input, comprising:

graph metadata generation logic configured to analyze the processinggraph and generate graph metadata that specifies a target tilingconfiguration for the output representation to tile the outputrepresentation into a set of non-overlapping tiles, a first tilingconfiguration for the input to tile the input into a first set ofoverlapping tiles, a second tiling configuration for the intermediaterepresentation to tile the intermediate representation into a second setof overlapping tiles, and a third tiling configuration for the furtherintermediate representation to tile the further intermediaterepresentation into a third set of overlapping or non-overlapping tiles;

compile time logic configured to modify the processing graph based onthe graph metadata and generate a modified processing graph, wherein themodified processing graph is configured to generate the first set ofoverlapping tiles in the first tiling configuration, the second set ofoverlapping tiles in the second tiling configuration by using the firstset of overlapping tiles as a first set of tile-by-tile effectivereceptive fields, the third set of overlapping or non-overlapping tilesin the third tiling configuration by using the second set of overlappingtiles as a second set of tile-by-tile second effective receptive fields,and the set of non-overlapping tiles in the target tiling configurationby using the third set of overlapping or non-overlapping tiles as athird set of tile-by-tile effective receptive fields; and

runtime logic configured with the compile time logic to execute themodified processing graph to execute the application.

2. The data processing system of claim 1, wherein the target tilingconfiguration is determined based on a number of processing nodes in thesequence of processing nodes.3. The data processing system of claim 2, wherein the target tilingconfiguration is determined based on respective processing logicsimplemented by respective processing nodes in the sequence of processingnodes.4. The data processing system of claim 3, wherein the target tilingconfiguration is determined based on a size of the outputrepresentation.4a. The data processing system of claim 1, wherein the target tilingconfiguration is determined based on one or more of: a number ofprocessing nodes in the sequence of processing nodes, respectiveprocessing logics implemented by respective processing nodes in thesequence of processing nodes, and/or a size of the outputrepresentation.5. The data processing system of claim 4, wherein the graph metadatageneration logic is further configured to reverse traverse theprocessing graph to determine the third tiling configuration as thethird set of tile-by-tile effective receptive fields of the set ofnon-overlapping tiles that satisfy the target tiling configuration, thesecond tiling configuration as the second set of tile-by-tile effectivereceptive fields of the third set of overlapping or non-overlappingtiles that satisfy the third tiling configuration, and the first tilingconfiguration as the first set of tile-by-tile effective receptivefields of the second set of overlapping tiles that satisfy the secondtiling configuration.6. The data processing system of claim 1, wherein the graph metadatafurther specifies a first padding configuration for the input, a secondpadding configuration for the intermediate representation, and a thirdpadding configuration for the further intermediate representation.7. The data processing system of claim 6, wherein the first paddingconfiguration applies a cumulative padding to pad the input into apadded input, wherein the second padding configuration applies nopadding to leave the intermediate representation unpadded, wherein thethird padding configuration applies no padding to leave the furtherintermediate representation unpadded.8. The data processing system of claim 7, wherein the graph metadatafurther specifies applying the first tiling configuration to the paddedinput after applying the first padding configuration to the input.9. The data processing system of claim 8, wherein the first tilingconfiguration confines the cumulative padding to those edges of thefirst set of overlapping tiles that coincide with edges of the paddedinput.10. The data processing system of claim 6, wherein the first tilingconfiguration configures tiles in the first set of overlapping tiles tohave a first tile size, wherein the second tiling configurationconfigures tiles in the second set of overlapping tiles to have a secondtile size, wherein the third tiling configuration configures tiles inthe third set of overlapping tiles to have a third tile size, andwherein the target tiling configuration configures tiles in the set ofnon-overlapping tiles to have a fourth tile size.11. The data processing system of claim 10, wherein the first, second,and third padding configurations configure each of the tiles in thefirst set of overlapping tiles to have the first tile size, each of thetiles in the second set of overlapping tiles to have the second tilesize, each of the tiles in the third set of overlapping tiles to havethe third tile size, and each of the tiles in the set of non-overlappingtiles to have the fourth tile size.12. The data processing system of claim 1, wherein the graph metadatafurther specifies a first zeroing-out configuration to zero-out thoseedges of the tiles in the second set of overlapping tiles that coincidewith edges of the intermediate representation.13. The data processing system of claim 12, wherein the zeroing-outconfigures values in the edges to be processed as zero input values forgeneration of the further intermediate representation, while conservingthe values non-edge sections of the intermediate representation.14. The data processing system of claim 12, wherein the zeroing-outconverts the values to zero values in the intermediate representation.15. The data processing system of claim 1, wherein the graph metadatafurther specifies a second zeroing-out configuration to zero-out thoseedges of the tiles in the third set of overlapping or non-overlappingtiles that coincide with edges of the further intermediaterepresentation.16. The data processing system of claim 15, wherein the zeroing-outconfigures values in the edges to be processed as zero input values forgeneration of the output representation, while conserving the values innon-edge sections of the further intermediate representation.17. The data processing system of claim 15, wherein the zeroing-outconverts the values to zero values in the further intermediaterepresentation.18. The data processing system of claim 1, wherein the graph metadatafurther specifies a first composite image configuration for the input, asecond composite image configuration for the intermediaterepresentation, a third composite image configuration for the furtherintermediate representation, and a fourth composite image configurationfor the output representation.19. The data processing system of claim 18, wherein the first compositeimage configuration configures the first set of overlapping tiles to bestored as a first composite representation, wherein the second compositeimage configuration configures the second set of overlapping tiles to bestored as a second composite representation, wherein the third compositeimage configuration configures the third set of overlapping tiles to bestored as a third composite representation, and wherein the fourthcomposite image configuration configures the set of non-overlappingtiles to be stored as a fourth composite representation.20. The data processing system of claim 19, wherein the first compositerepresentation includes the padded input, wherein the second compositerepresentation stores the tiles in the second set of overlapping tilessuch that overlapping regions are redundantly localized in each of thetiles, and wherein the third composite representation stores the tilesin the third set of overlapping tiles such that overlapping regions areredundantly localized in each of the tiles.21. The data processing system of claim 1, wherein the graph metadatafurther specifies a first tile overlap configuration for the input, asecond tile overlap configuration for the intermediate representation, athird tile overlap configuration for the further intermediaterepresentation, and a fourth tile overlap configuration for the outputrepresentation.22. The data processing system of claim 21, wherein the first tileoverlap configuration configures adjacent tiles in the first set ofoverlapping tiles to have a first overlap size, wherein the second tileoverlap configuration configures adjacent tiles in the second set ofoverlapping tiles to have a second overlap size, and wherein the thirdtile overlap configuration configures adjacent tiles in the third set ofoverlapping tiles to have a third overlap size.23. The data processing system of claim 1, wherein the graph metadatafurther specifies a first tensor size configuration for the input, asecond tensor size configuration for the intermediate representation, athird tensor size configuration for the further intermediaterepresentation, and a fourth tensor size configuration for the outputrepresentation.24. The data processing system of claim 23, wherein the first tensorsize configuration configures the padded input to have first spatialdimensions, wherein the second tensor size configuration configures theintermediate representation to have second spatial dimensions, whereinthe third tensor size configuration configures the further intermediaterepresentation to have third spatial dimensions, and wherein the fourthtensor size configuration configures the output representation to havefourth spatial dimensions.25. The data processing system of claim 24, wherein the fourth tensorsize is divisible by the fourth tile size.26. The data processing system of claim 25, wherein the first tensorsize is not divisible by the first tile size.27. The data processing system of claim 1, wherein the graph metadatafurther specifies a first striding configuration for the inputprocessing node, a second striding configuration for the intermediateprocessing node, and a third striding configuration for the outputprocessing node.28. The data processing system of claim 27, wherein the first stridingconfiguration configures at least one kernel of the input processingnode to have a first step size when traversing the input, wherein thesecond striding configuration configures at least one kernel of theintermediate processing node to have a second step size when traversingthe intermediate representation, and wherein the third stridingconfiguration configures at least one kernel of the output processingnode to have a third step size when traversing the further intermediaterepresentation.29. The data processing system of claim 1, wherein the graph metadatafurther specifies a first kernel size configuration for the inputprocessing node, a second kernel size configuration for the intermediateprocessing node, and a third kernel size configuration for the outputprocessing node.30. The data processing system of claim 29, wherein the first kernelsize configuration configures at least one kernel of the inputprocessing node to have a first local receptive field when traversingthe input, wherein the second kernel size configuration configures atleast one kernel of the intermediate processing node to have a secondlocal receptive field when traversing the intermediate representation,and wherein the third kernel size configuration configures at least onekernel of the output processing node to have a third local receptivefield when traversing the further intermediate representation.31. The data processing system of claim 1, wherein the graph metadatapairs the input and the input processing node in a first pair,associates input metadata, including the first tiling configuration, thefirst padding configuration, the first composite image configuration,the first tile overlap configuration, the first tensor sizeconfiguration, the first striding configuration, and/or the first kernelsize configuration, with the first pair, and makes the input metadataavailable for use by the modified processing graph.32. The data processing system of claim 31, wherein the graph metadatapairs the intermediate representation and the intermediate processingnode in a second pair, associates intermediate metadata, including thesecond tiling configuration, the second padding configuration, the firstzeroing-out configuration, the second composite image configuration, thesecond tile overlap configuration, the second tensor size configuration,the second striding configuration, and/or the second kernel sizeconfiguration, with the second pair, and makes the intermediate metadataavailable for use by the modified processing graph.33. The data processing system of claim 32, wherein the graph metadatapairs the further intermediate representation and the output processingnode in a third pair, associates further intermediate metadata,including the third tiling configuration, the third paddingconfiguration, the second zeroing-out configuration, the third compositeimage configuration, the third tile overlap configuration, the thirdtensor size configuration, the third striding configuration, and/or thethird kernel size configuration, with the third pair, and makes thefurther intermediate metadata available for use by the modifiedprocessing graph.34. The data processing system of claim 33, wherein the graph metadataassociates output metadata, including the target tiling configuration,the fourth composite image configuration, and/or the fourth tensor sizeconfiguration, with the output representation, and makes the outputmetadata available for use by the modified processing graph.35. The data processing system of claim 1, wherein the graph metadatainserts a first tile materialization node before the input processingnode, a second tile materialization node after the input processingnode, a third tile materialization node after the intermediateprocessing node, and a fourth tile materialization node after the outputprocessing node.36. The data processing system of claim 35, wherein the first tilematerialization node is configured to checkpoint the first set ofoverlapping tiles on a tile-by-tile basis and/or the input metadata tomemory, wherein the memory is external memory, on-chip memory, and/oron-chip processing elements.37. The data processing system of claim 35, wherein the first tilematerialization node is further configured to stream the first set ofoverlapping tiles on a tile-by-tile basis and/or the input metadata toanother processing node, wherein the another processing node is in themodified processing graph and/or another modified processing graph.38. The data processing system of claim 35, wherein the second tilematerialization node is configured to checkpoint the second set ofoverlapping tiles on a tile-by-tile basis and/or the intermediatemetadata to memory, wherein the memory is external memory, on-chipmemory, and/or on-chip processing elements.39. The data processing system of claim 35, wherein the second tilematerialization node is further configured to stream the second set ofoverlapping tiles on a tile-by-tile basis and/or the intermediatemetadata to another processing node, wherein the another processing nodeis in the modified processing graph and/or another modified processinggraph.40. The data processing system of claim 35, wherein the third tilematerialization node is configured to checkpoint the third set ofoverlapping tiles on a tile-by-tile basis and/or the furtherintermediate metadata to memory, wherein the memory is external memory,on-chip memory, and/or on-chip processing elements.41. The data processing system of claim 35, wherein the third tilematerialization node is further configured to stream the third set ofoverlapping tiles on a tile-by-tile basis and/or the furtherintermediate metadata to another processing node (e.g., via a skipconnection), wherein the another processing node is in the modifiedprocessing graph and/or another modified processing graph.42. The data processing system of claim 35, wherein the third tilematerialization node is configured to checkpoint the set ofnon-overlapping tiles on a tile-by-tile basis and/or the output metadatato memory, wherein the memory is external memory, on-chip memory, and/oron-chip processing elements.43. The data processing system of claim 35, wherein the third tilematerialization node is further configured to stream the set ofnon-overlapping tiles on a tile-by-tile basis and/or the output metadatato another processing node, wherein the another processing node is inthe modified processing graph and/or another modified processing graph.44. The data processing system of claim 1, wherein the compile timelogic is further configured to generate one or more configuration filesthat define the modified processing graph, wherein the runtime logic isfurther configured to execute the application using the configurationfiles.45. The data processing system of claim 1, wherein a size of the outputrepresentation is conserved from the processing graph to the modifiedprocessing graph.46. The data processing system of claim 1, wherein the input is an arrayof pixels, and the tiles in the first set of overlapping tiles, thetiles in the second set of overlapping tiles, the tiles in the third setof overlapping tiles, and the tiles in the set of non-overlapping tilesare sub-arrays of the pixels.47. The data processing system of claim 46, wherein the input, theintermediate representation, the further intermediate representation,and the output representation each have one or more channels, and thetiles in the first set of overlapping tiles, the tiles in the second setof overlapping tiles, the tiles in the third set of overlapping tiles,and the tiles in the set of non-overlapping tiles each have one or morechannels.49. The data processing system of claim 1, wherein the processing graphis a neural network.50. The data processing system of claim 49, wherein the neural networkis a convolutional neural network.51. The data processing system of claim 50, wherein processing nodes inthe sequence of processing nodes include convolution nodes, max poolingnodes, min pooling nodes, average pooling nodes, non-linearity nodes,normalization nodes, dropout nodes, concatenation nodes, transposeconvolution nodes, fully connected nodes, softmax nodes, and/or lossnodes.52. The data processing system of claim 1, wherein the compile timelogic is further configured to partition the processing graph into asequence of processing subgraphs, wherein the graph metadata generationlogic is further configured to analyze respective processing subgraphsin the sequence of processing subgraphs and generate respective graphmetadata for the respective processing subgraphs, wherein the compiletime logic is further configured to modify the respective processingsubgraphs based on the respective graph metadata and generate respectivemodified processing subgraphs, and wherein the runtime logic is furtherconfigured to execute the respective modified processing subgraphs toexecute the application.53. The data processing system of claim 53, wherein the runtime logic isfurther configured to execute the respective processing subgraphs inparallel.54. The data processing system of claim 1, wherein the runtime logic isfurther configured to execute tile-by-tile processing in the processinggraph in parallel.55. The data processing system of claim 1, wherein the processing graphis a forward pass graph.56. The data processing system of claim 1, wherein the processing graphis a backward pass graph.57. The data processing system of claim 1, wherein processing nodes(layers) in the sequence of processing nodes (layers) includeconvolution nodes, max pooling nodes, min pooling nodes, average poolingnodes, non-linearity nodes, normalization nodes, dropout nodes,concatenation nodes, transpose convolution nodes, fully connected nodes,softmax nodes, and/or loss nodes.58. A data processing system, comprising:

graph metadata generation logic configured to analyze a processing graphand generate graph metadata that specifies a target configuration for anoutput feature map of the processing graph, and respectiveconfigurations for an input and intermediate feature maps of theprocessing graph that contribute to generation of the output featuremap, wherein the respective configurations progressively satisfy thetarget configuration;

compile time logic configured to modify the processing graph based onthe graph metadata and generate a modified processing graph, wherein themodified processing graph is configured to generate the output featuremap in the target configuration in response to processing the input andthe intermediate feature maps in the respective configurations; andruntime logic configured with the compile time logic to execute themodified processing graph to execute the application.

59. The data processing system of claim 58, wherein the targetconfiguration and the respective configurations specify respectivetiling configurations, padding configurations, zeroing-outconfigurations, composite image configurations, tile overlapconfigurations, tensor size configurations, striding configurations,and/or kernel size configurations.60. A data processing system, comprising:

graph metadata generation logic configured to analyze a processing graphand generate graph metadata that specifies a target configuration for anoutput gradient of the processing graph, and respective configurationsfor an input and intermediate gradients of the processing graph thatcontribute to generation of the output gradient, wherein the respectiveconfigurations progressively satisfy the target configuration;

compile time logic configured to modify the processing graph based onthe graph metadata and generate a modified processing graph, wherein themodified processing graph is configured to generate the output gradientin the target configuration in response to processing the input and theintermediate gradients in the respective configurations; and

runtime logic configured with the compile time logic to execute themodified processing graph to execute the application.

61. The data processing system of claim 60, wherein the targetconfiguration and the respective configurations specify respectivetiling configurations, padding configurations, zeroing-outconfigurations, composite (aggregate/composed) image configurations,tile overlap configurations, tensor size configurations, stridingconfigurations, and/or kernel size configurations.62. The data processing system of claim 60, wherein the input,intermediate, and output gradients are input gradients.

Clause Set 9 (Padding Before Tiling, Location-Based Tiling, Zeroing-Out)

1. A data processing system configured to receive a processing graph ofan application, the processing graph having a plurality of processingnodes configured to process an input and generate at least oneintermediate representation of the input and at least one outputrepresentation of the input, the processing graph configured to apply apre-padding tiling prior to applying an input padding and anintermediate padding, wherein the pre-padding tiling tiles the inputinto a set of input tiles with different tile sizes, tiles theintermediate representation into a set of intermediate tiles withdifferent tile sizes, and tiles the output representation into a set ofoverlapping output tiles with different tile sizes, wherein the inputpadding pads input tiles in the set of input tiles into post-paddedinput tiles, and wherein the intermediate padding pads intermediatetiles in the set of input tiles into post-padded intermediate inputtiles, comprising:

compile time logic configured to modify the processing graph andgenerate a modified processing graph,

-   -   the modified processing graph configured to apply a post-padding        tiling after applying a cumulative input padding that confines        padding to the input,        -   wherein the cumulative input padding pads the input into a            padded input, and        -   wherein the post-padding tiling tiles the padded input into            a set of pre-padded input tiles with a same tile size, tiles            the intermediate representation into a set of intermediate            tiles with a same tile size, and tiles the output            representation into a set of non-overlapping output tiles            with a same tile size; and

runtime logic configured with the compile time logic to execute themodified processing graph to execute the application.

2. The data processing system of claim 1, wherein pre-padded input tilesin the set of pre-padded input tiles are padded based on locations ofthe pre-padded input tiles in the input.3. The data processing system of claim 2, wherein the locations includetop-left [0], top [1], top-right [2], middle-left [3], middle [4],middle-right [5], bottom-left [6], bottom [7], and bottom-right [8].4. The data processing system of claim 3, wherein a pre-padded inputtile in the top-left [0] is padded only along a top edge and a leftedge.5. The data processing system of claim 3, wherein a pre-padded inputtile in the top [1] is padded only along a top edge.6. The data processing system of claim 3, wherein a pre-padded inputtile in the top-right [2] is padded only along a top edge and a rightedge.7. The data processing system of claim 3, wherein a pre-padded inputtile in the middle-left [3] is padded only along a left edge.8. The data processing system of claim 3, wherein a pre-padded inputtile in the middle [4] is unpadded.9. The data processing system of claim 3, wherein a pre-padded inputtile in the middle-right [5] is padded only along a right edge.10. The data processing system of claim 3, wherein a pre-padded inputtile in the bottom-left [6] is padded only along a bottom edge and aleft edge.11. The data processing system of claim 3, wherein a pre-padded inputtile in the bottom [7] is padded only along a bottom edge.12. The data processing system of claim 3, wherein a pre-padded inputtile in the bottom-right [8] is padded only along a bottom edge and aright edge.13. The data processing system of claim 2, wherein the pre-padded inputtiles are padded with zero padding.14. The data processing system of claim 1, wherein adjacent pre-paddedinput tiles in the set of pre-padded input tiles have overlappingregions.15. The data processing system of claim 1, wherein adjacent intermediatetiles in the set of intermediate tiles have overlapping regions.16. The data processing system of claim 15, wherein the modifiedprocessing graph is further configured to apply zeroing-out to thoseedges of intermediate tiles in the set of intermediate tiles thatcoincide with edges of the intermediate representation.17. The data processing system of claim 16, wherein the zeroing-outconfigures values in the edges to be processed as zero input values forgeneration of the output representation and/or another intermediaterepresentation, while conserving the values in non-edge sections of theintermediate representation.18. The data processing system of claim 16, wherein the zeroing-outconverts the values to zero values in the intermediate representation.19. The data processing system of claim 16, wherein the edges arezeroed-out based on locations of the intermediate tiles in theintermediate representation.20. The data processing system of claim 19, wherein the locationsinclude top-left [0], top [1], top-right [2], middle-left [3], middle[4], middle-right [5], bottom-left [6], bottom [7], and bottom-right[8].21. The data processing system of claim 20, wherein an intermediateinput tile in the top-left [0] is zeroed-out only along a top edge and aleft edge.22. The data processing system of claim 20, wherein an intermediateinput tile in the top [1] is zeroed-out only along a top edge.23. The data processing system of claim 20, wherein an intermediateinput tile in the top-right [2] is zeroed-out only along a top edge anda right edge.24. The data processing system of claim 20, wherein an intermediateinput tile in the middle-left [3] is zeroed-out only along a left edge.25. The data processing system of claim 20, wherein an intermediateinput tile in the middle [4] is not zeroed-out.26. The data processing system of claim 20, wherein an intermediateinput tile in the middle-right [5] is zeroed-out only along a rightedge.27. The data processing system of claim 20, wherein an intermediateinput tile in the bottom-left [6] is zeroed-out only along a bottom edgeand a left edge.28. The data processing system of claim 20, wherein an intermediateinput tile in the bottom [7] is zeroed-out only along a bottom edge.29. The data processing system of claim 20, wherein an intermediateinput tile in the bottom-right [8] is zeroed-out only along a bottomedge and a right edge.30. The data processing system of claim 1, wherein non-overlappingoutput tiles in set of non-overlapping reduce redundant computations andredundant memory access and occupancy during execution the application.31. The data processing system of claim 1, wherein the cumulative inputpadding eliminates the intermediate padding, wherein elimination of theintermediate padding reduces redundant computations and redundant memoryaccess and occupancy during the execution of the application.32. The data processing system of claim 1, wherein the same tile size ofthe pre-padded input tiles enables a corresponding processing node inthe plurality of processing nodes to process the pre-padded input tilesusing a same computation logic, wherein use of the same computationlogic from pre-padded input tile-to-pre-padded input tile reducesredundant computation and redundant memory access and occupancy duringexecution the application.33. The data processing system of claim 1, wherein the same tile size ofthe intermediate tiles enables a corresponding processing node in theplurality of processing nodes to process the intermediate tiles using asame computation logic, wherein use of the same computation logic fromintermediate tile-to-intermediate tile reduces redundant computation andredundant memory access and occupancy during execution the application.34. The data processing system of claim 1, wherein the same tile size ofthe non-overlapping output tiles enables a corresponding processing nodein the plurality of processing nodes to process the non-overlappingoutput tiles using a same computation logic, wherein use of the samecomputation logic from non-overlapping output tile-to-non-overlappingoutput tile reduces redundant computation and redundant memory accessand occupancy during execution the application.35. The data processing system of claim 1, wherein a size of the outputrepresentation is conserved from the processing graph to the modifiedprocessing graph.36. The data processing system of claim 1, wherein the input is an arrayof pixels.37. The data processing system of claim 36, wherein the pre-padded inputtiles, the intermediate tiles, and the non-overlapping output tiles aresub-arrays of the pixels.38. The data processing system of claim 37, wherein the input, theintermediate representation, and the output representation each have oneor more channels, and the pre-padded input tiles, the intermediatetiles, and the non-overlapping output tiles each have one or morechannels.40. The data processing system of claim 1, wherein the compile timelogic is further configured to partition the processing graph into asequence of processing subgraphs, wherein the compile time logic isfurther configured to modify the respective processing subgraphs andgenerate respective modified processing subgraphs that are configured toapply the post-padding tiling after applying the cumulative inputpadding and to apply the zeroing-out, wherein the runtime logic isfurther configured to execute the respective modified processingsubgraphs to execute the application, wherein the runtime logic isfurther configured to execute the respective processing subgraphs inparallel, wherein the runtime logic is further configured to executetile-by-tile processing in the processing graph in parallel.41. The data processing system of claim 1, wherein the processing graphis a neural network, wherein the neural network is a convolutionalneural network.42. The data processing system of claim 41, wherein processing nodes(layers) in the plurality of processing nodes include convolution nodes,max pooling nodes, min pooling nodes, average pooling nodes,non-linearity nodes, normalization nodes, dropout nodes, concatenationnodes, transpose convolution nodes, softmax nodes, and/or loss nodes.43. A data processing system, comprising:

padding logic configured to pad an input and generate a padded input;

tiling logic configured with the padding logic to tile the padded inputinto a plurality of tiles, with padding in tiles in the plurality oftiles confined to those edges of the tiles that coincide with edges ofthe padded input; and

processing logic configured with the tiling logic to process the tilesand generate one or more alternative representations of the input.

44. A data processing system, comprising:

tiling logic configured to tile a padded input into a plurality oftiles, with padding in tiles in the plurality of tiles confined to thoseedges of the tiles that coincide with edges of the padded input.

45. A data processing system, comprising:

padding logic configured to pad an input and generate a padded input;

tiling logic configured with the padding logic to tile the padded inputinto a plurality of tiles; and

processing logic configured with the tiling logic to process the tilesand generate one or more alternative representations of the input.

46. The data processing system of claim 45, wherein individual edges ofindividual tiles are selectively padded or left unpadded, based on tilelocations in the input.47. The data processing system of claim 46, wherein the tile locationsinclude top-left [0], top [1], top-right [2], middle-left [3], middle[4], middle-right [5], bottom-left [6], bottom [7], and bottom-right[8].48. The data processing system of claim 47, wherein a pre-padded inputtile in the top-left [0] is padded only along a top edge and a leftedge.49. The data processing system of claim 47, wherein a pre-padded inputtile in the top [1] is padded only along a top edge.50. The data processing system of claim 47, wherein a pre-padded inputtile in the top-right [2] is padded only along a top edge and a rightedge.51. The data processing system of claim 47, wherein a pre-padded inputtile in the middle-left [3] is padded only along a left edge.52. The data processing system of claim 47, wherein a pre-padded inputtile in the middle [4] is unpadded.53. The data processing system of claim 47, wherein a pre-padded inputtile in the middle-right [5] is padded only along a right edge.54. The data processing system of claim 47, wherein a pre-padded inputtile in the bottom-left [6] is padded only along a bottom edge and aleft edge.55. The data processing system of claim 47, wherein a pre-padded inputtile in the bottom [7] is padded only along a bottom edge.56. The data processing system of claim 47, wherein a pre-padded inputtile in the bottom-right [8] is padded only along a bottom edge and aright edge.56a. The data processing system of claim 46, wherein:

the tile locations include top-left, top, top-right, middle-left,middle, middle-right, bottom-left, bottom, and bottom-right;

a pre-padded input tile in the top-left is padded only along a top edgeand a left edge; a pre-padded input tile in the top is padded only alonga top edge;

a pre-padded input tile in the top-right is padded only along a top edgeand a right edge; a pre-padded input tile in the middle-left is paddedonly along a left edge;

a pre-padded input tile in the middle is unpadded;

a pre-padded input tile in the middle-right is padded only along a rightedge;

a pre-padded input tile in the bottom-left is padded only along a bottomedge and a left edge;

a pre-padded input tile in the bottom is padded only along a bottomedge; and

a pre-padded input tile in the bottom-right is padded only along abottom edge and a right edge.

57. The data processing system of claim 45, wherein the tiles are paddedwith zero padding.58. The data processing system of claim 45, wherein adjacent tiles inthe plurality of tiles have overlapping regions.59. The data processing system of claim 45, wherein the tiles have asame tile size.60. The data processing system of claim 45, wherein the tiling logic isfurther configured to tile each of the alternative representations intorespective pluralities of tiles.61. The data processing system of claim 60, wherein tiles in eachplurality of tiles in the respective pluralities of tiles have a sametile size.62. The data processing system of claim 60, wherein the alternativerepresentations include an output representation of the input.63. The data processing system of claim 62, wherein a plurality of tilesof the output representation has non-overlapping tiles.64. The data processing system of claim 63, wherein respectivepluralities of tiles of alternative representations other than theoutput representation have overlapping regions between adjacent tiles.65. A data processing system, comprising:

padding logic configured to pad an input with a padding frame andgenerate a padded input;

tiling logic configured to tile the padded input into a plurality oftiles, tiles in the plurality of tiles including partially padded tileswith one or more edges disposed on the padding frame and unpadded tileswith edges disposed off the padding frame; and

processing logic configured with the tiling logic to process the tilesand generate one or more alternative representations of the input.

66. The data processing system of claim 65, wherein the edges of thepartially padded tiles are formed from parts of the padding frame.67. The data processing system of claim 65, wherein the edges of theunpadded tiles are formed from parts of the input.68. The data processing system of claim 65, wherein the padding framehas zero padding.69. A data processing system, comprising:

padding logic configured to cause generation of pre-padded tiles, withpadding in the pre-padded tiles confined to those edges of thepre-padded tiles that coincide with edges of the padding.

70. A data processing system, comprising:

compile logic configured to receive a convolutional neural network, theconvolutional neural network having a sequence of convolutions, thesequence of convolutions including a padded convolution followed byadditional padded convolutions;

the compile logic configured to transform the sequence of convolutionsinto a sequence of unpadded convolutions, wherein the sequence ofunpadded convolutions comprises zero-padding an input to the sequenceand tiling the input to generate a plurality of tiles, and performingthe sequence of unpadded convolutions on the plurality of tiles; and

runtime logic configured with the compile time logic to execute theconvolution neural network by executing the sequence of unpaddedconvolutions on the plurality of tiles.

71. A data processing system configured to receive a processing graph ofan application, the processing graph having a plurality of processingnodes configured to process an input and generate at least one outputrepresentation of the input, the processing graph configured to applypre-padding tiling prior to applying an input padding and an outputpadding, wherein the pre-padding tiling tiles the input into a set ofinput tiles with different tile sizes and tiles the outputrepresentation into a set of overlapping output tiles with differenttile sizes, wherein the input padding pads input tiles in the set ofinput tiles into post-padded input tiles, and wherein the output paddingpads overlapping output tiles in the set of overlapping output tilesinto post-padded overlapping output tiles, comprising:

compile time logic configured to modify the processing graph andgenerate a modified processing graph,

-   -   the modified processing graph configured to apply a post-padding        tiling after applying a cumulative input padding that confines        padding to the input and compensates for the output padding,        -   wherein the cumulative input padding pads the input into a            padded input, and        -   wherein the post-padding tiling tiles the padded input into            a set of pre-padded input tiles with a same tile size and            tiles the output representation into a set of            non-overlapping output tiles with a same tile size; and

runtime logic configured with the compile time logic to execute themodified processing graph to execute the application.

72. A data processing system, comprising:

compile time logic configured to modify a processing graph and generatea modified processing graph,

-   -   the modified processing graph configured to apply a post-padding        tiling after applying a cumulative input padding that confines        padding to an input to the processing graph and compensates for        an intermediate padding in the processing graph,        -   wherein the cumulative input padding pads the input into a            padded input, and        -   wherein the post-padding tiling tiles the padded input into            a set of pre-padded input tiles with a same tile size, tiles            at least one intermediate representation generated by the            processing graph into a set of intermediate tiles with a            same tile size, and tiles at least one output representation            generated by the processing graph into a set of            non-overlapping output tiles with a same tile size; and

runtime logic configured with the compile time logic to execute themodified processing graph to execute the application.

73. A computer-implemented method, including:

receiving an input tensor and storing the input tensor in a memory;

padding the input tensor, by adding one or more rows and columns ofpadding pixels along a periphery of the input tensor, to generate apadded input tensor, wherein the padding pixels comprise zero value;

tiling the padded input tensor into a plurality of at least partiallyoverlapping input tiles having the same dimensions,

-   -   wherein the plurality of input tiles comprises (i) a first input        tile having padding pixels on exactly two edges, (ii) a second        input tile having padding pixels on exactly one edge, and (iii)        a third input tile that does not include any padding pixel;

processing individual input tiles of the plurality of input tiles of thepadded image using a kernel, to generate corresponding intermediatetiles of a plurality of intermediate tiles of an intermediate tensor;and

storing the plurality of intermediate tiles in the memory.

74. The computer-implemented method of claim 73, wherein the first inputtile, the second input tile, and the third input tile are respectivelyprocessed to generate a first intermediate tile, a second intermediatetile, and a third intermediate tile of the plurality of intermediatetiles, and wherein the method further comprises:

updating at least some of the plurality of intermediate tiles, byassigning a zero value to a plurality of peripheral pixels that arealong exactly two edges of the first intermediate tile and that arealong exactly one edge of the second intermediate tile, withoutassigning a zero value to any pixel of the third intermediate tile.

75. The computer-implemented method of claim 74, wherein:

the one or more rows and columns of the padding pixels comprise a firstnumber of rows and columns of the padding pixels;

the plurality of peripheral pixels, to which the zero value is assigned,comprises a second number of rows and columns of peripheral pixels; and

each of the first number and the second number is a positive integerhigher than zero, and the first number is higher than the second number.

76. The computer-implemented method of claim 75, wherein:

the first number is one more than the second number.

77. The computer-implemented method of claim 74, wherein processingindividual input tiles of the plurality of input tiles comprisesconvoluting individual input tiles of the plurality of input tiles withthe kernel.78. The computer-implemented method of claim 74, wherein:

the first input tile and the second input tile are respectivelyprocessed to generate a first intermediate tile and a secondintermediate tile of the plurality of intermediate tiles;

in the intermediate tensor, the first intermediate tile and the secondintermediate tile overlaps to form an overlapping region between thefirst and second intermediate tiles; and

storing the plurality of intermediate tiles in the memory comprisingstoring the first and second intermediate tiles separately, such thatthe overlapping region is stored as a part of the first intermediatetile and as a part of the second intermediate tile.

79. The computer-implemented method of claim 74, further comprising:

processing individual intermediate tiles of the plurality ofintermediate tiles using another kernel, to generate correspondingoutput tiles of a plurality of output tiles of an output tensor.

80. The computer-implemented method of claim 79, wherein the outputtiles within the output tensor do not overlap with each other.81. The computer-implemented method of claim 73, wherein the first inputtile has padding pixels only on a left edge and a top edge, the secondinput tile has padding pixels only on a top edge, a fourth input tile ofthe plurality of input tiles has padding pixels only on a right edge anda top edge, a fifth input tile of the plurality of input tiles haspadding pixels only on a left edge, a sixth input tile of the pluralityof input tiles has padding pixels only on a right edge, a seventh inputtile of the plurality of input tiles has padding pixels only on a leftedge and a bottom edge, an eighth input tile of the plurality of inputtiles has padding pixels only on a bottom edge, and a ninth input tileof the plurality of input tiles has padding pixels only on a right edgeand a bottom edge.

82. The computer-implemented method of claim 73, wherein the pluralityinput tiles are at least partially overlapping such that:

an overlap region is formed between the first and second input tiles,such that a first section of the overlap region comprises acorresponding section of the input image, and a second section of theoverlap region comprises one or more padding pixels.83. The computer-implemented method of claim 73, further comprising:

generating input tiling metadata that comprises dimensionality andoverlap information associated with the plurality of input tiles; and

storing the input tiling metadata in the memory.

84. A data processing system, comprising:

padding logic to zero-pad an input tensor by adding first number oflines of zero-valued pixels around a periphery of the input tensor, togenerate a padded input tensor;

tiling logic to tile the padded input tensor into a plurality of inputtiles;

one or more processors to process individual input tiles of theplurality of input tiles with a kernel, to generate a correspondingplurality of intermediate tiles of an intermediate tensor, wherein theintermediate tensor comprising plurality of intermediate tiles includes(i) a central area and (ii) a second number of lines of pixels arrangedaround the central area, and wherein one or more pixels within thesecond number of lines of pixels comprise non-zero pixel values; and

a zero-assigning logic to assign zero-values to each pixel within thesecond number of lines of pixels within the intermediate tensor.

85. The data processing system of claim 84, wherein any two neighboringintermediate tiles within the plurality of intermediate tiles have acorresponding overlap region.

Clause Set 10 (Weight Gradient Calculation in Backward Pass)

1. A non-transitory computer readable storage medium impressed withcomputer program instructions, the instructions, when executed on aprocessor, implement a method comprising:

generating a plurality of partial weight gradients, based on processinga corresponding plurality of gradient tiles of a gradient tensor; and

generating, based on the plurality of partial weight gradients, a finalweight gradient corresponding to the gradient tensor.

2. The non-transitory computer readable storage medium of claim 1,wherein generating the final weight gradient comprises:

summing the plurality of partial weight gradients, to generate the finalweight gradient.

3. The non-transitory computer readable storage medium of claim 2,wherein generating the final weight gradient comprises:

averaging the sum of the plurality of partial weight gradients, togenerate the final weight gradient.

4. The non-transitory computer readable storage medium of claim 1,wherein generating the plurality of partial weight gradients comprises:

generating a first partial weight gradient of the plurality of partialweight gradients, based on processing a first gradient tile of theplurality of gradient tiles; and

generating a second partial weight gradient of the plurality of partialweight gradients, based on processing a second gradient tile of theplurality of gradient tiles.

5. The non-transitory computer readable storage medium of claim 1,wherein the plurality of partial weight gradients is generated based onprocessing a corresponding plurality of gradient tiles of a gradienttensor and a corresponding plurality of input tiles of an input tensor.6. The non-transitory computer readable storage medium of claim 5,wherein:

the plurality of input tiles of the input tensor is generated by an(L)^(th) layer of a forward pass of a processing graph;

the plurality of gradient tiles of the gradient tensor is generated byan (L+1)^(th) layer of a backward pass of the processing graph; and

plurality of partial weight gradients is generated by an (L)^(th) layerof the backward pass of the processing graph.

7. The non-transitory computer readable storage medium of claim 5,wherein generating the plurality of partial weight gradients comprises:

generating a first partial weight gradient of the plurality of partialweight gradients, based on processing a first gradient tile of theplurality of gradient tiles and a first input tile of the plurality ofinput tiles; and

generating a second partial weight gradient of the plurality of partialweight gradients, based on processing a second gradient tile of theplurality of gradient tiles and a second input tile of the plurality ofinput tiles.

8. The non-transitory computer readable storage medium of claim 6,further comprising:

training weights of the (L)^(th) layer of the forward pass, based on thefinal weight gradient generated for the (L)^(th) layer of the backwardpass.

9. The non-transitory computer readable storage medium of claim 1,further comprising:

generating, by one or more on-chip reconfigurable processors, theplurality of partial weight gradients;

storing, on one or more on-chip memory, the generated plurality ofpartial weight gradients;

generating the final weight gradient, based on the plurality of partialweight gradients stored on the one or more on-chip memory; and

writing the final weight gradient to an off-chip memory.

10. The non-transitory computer readable storage medium of claim 9,wherein one or more, or all, of the plurality of partial weightgradients is not stored in the off-chip memory.11. The non-transitory computer readable storage medium of claim 1,further comprising:

training weights of a processing node, using the final weight gradient.

12. A data processing system, comprising:

compile time logic configured to process a processing graph to generatea modified processing graph comprising a plurality of forward processingnodes of a forward pass and a plurality of backward processing nodes ofa backward pass; and

runtime logic configured with the compile time logic to execute themodified processing graph to:

-   -   generate, at a backward processing node of the plurality of        backward processing nodes, a plurality of partial weight        gradients, based on processing a corresponding plurality of        gradient tiles of a gradient tensor, and    -   generate, based on the plurality of partial weight gradients, a        final weight gradient corresponding to the gradient tensor.        13. A computer implemented method, comprising:

generating a plurality of partial weight gradients, based on processinga corresponding plurality of gradient tiles of a gradient tensor; and

generating, based on the plurality of partial weight gradients, a finalweight gradient corresponding to the gradient tensor.

14. The method of claim 13, wherein generating the final weight gradientcomprises: summing the plurality of partial weight gradients, togenerate the final weight gradient.15. The method of claim 14, wherein generating the final weight gradientcomprises:

averaging the sum of the plurality of partial weight gradients, togenerate the final weight gradient.

16. The method of claim 13, wherein generating the plurality of partialweight gradients comprises:

generating a first partial weight gradient of the plurality of partialweight gradients, based on processing a first gradient tile of theplurality of gradient tiles; and

generating a second partial weight gradient of the plurality of partialweight gradients, based on processing a second gradient tile of theplurality of gradient tiles.

17. The method of claim 13, wherein the plurality of partial weightgradients is generated based on processing a corresponding plurality ofgradient tiles of a gradient tensor and a corresponding plurality ofinput tiles of an input tensor.18. The method of claim 17, wherein:

the plurality of input tiles of the input tensor is generated by an(L)^(th) layer of a forward pass of a processing graph;

the plurality of gradient tiles of the gradient tensor is generated byan (L+1)^(th) layer of a backward pass of the processing graph; and

plurality of partial weight gradients is generated by an (L)^(th) layerof the backward pass of the processing graph.

19. The method of claim 18, wherein generating the plurality of partialweight gradients comprises:

generating a first partial weight gradient of the plurality of partialweight gradients, based on processing a first gradient tile of theplurality of gradient tiles and a first input tile of the plurality ofinput tiles; and

generating a second partial weight gradient of the plurality of partialweight gradients, based on processing a second gradient tile of theplurality of gradient tiles and a second input tile of the plurality ofinput tiles.

20. The method of claim 18, further comprising:

training weights of the (L)^(th) layer of the forward pass, based on thefinal weight gradient generated for the (L)^(th) layer of the backwardpass.

Clause Set 11 (Backward Pass)

1. A data processing system configured to receive a graph with asequence of layers, comprising:

a runtime logic configured to

-   -   execute a first forward subgraph in a sequence of forward        subgraphs of the graph in a first forward topology of tiling        configurations to forward propagate a first set of input tiles        through a first input layer and generate a first set of        intermediate tiles, forward propagate the first set of        intermediate tiles through a first intermediate layer and        generate a first set of further intermediate tiles, and forward        propagate the first set of further intermediate tiles through a        first output layer and generate a first set of non-overlapping        output tiles; and    -   execute a first backward subgraph in a sequence of backward        subgraphs of the graph in a first backward topology of tiling        configurations to backward propagate a first set of        non-overlapping input gradient tiles through a first        backpropagation input layer and generate (i) a first set of        intermediate gradient tiles and (ii) first input weight        gradients for the first output layer, backward propagate the        first set of intermediate gradient tiles through a first        backpropagation intermediate layer and generate (i) a first set        of further intermediate gradient tiles and (ii) first        intermediate weight gradients for the first intermediate layer,        and backward propagate the first set of further intermediate        gradient tiles through a first backpropagation output layer and        generate (i) a first set of output gradient tiles and (ii) first        output weight gradients for the first input layer.        2. The data processing system of claim 1, wherein the runtime        logic is further configured to: execute a second forward        subgraph in the sequence of forward subgraphs of the graph in a        second forward topology of tiling configurations to forward        propagate a second set of input tiles through a second input        layer and generate a second set of intermediate tiles, forward        propagate the second set of intermediate tiles through a second        intermediate layer and generate a second set of further        intermediate tiles, and forward propagate the second set of        further intermediate tiles through a second output layer and        generate a second set of non-overlapping output tiles; and

execute a second backward subgraph in the sequence of backward subgraphsof the graph in a second backward topology of tiling configurations tobackward propagate a second set of non-overlapping input gradient tilesthrough a second backpropagation input layer and generate (i) a secondset of intermediate gradient tiles and (ii) second input weightgradients for the second output layer, backward propagate the second setof intermediate gradient tiles through a second backpropagationintermediate layer and generate (i) a second set of further intermediategradient tiles and (ii) second intermediate weight gradients for thesecond intermediate layer, and backward propagate the second set offurther intermediate gradient tiles through a second backpropagationoutput layer and generate (i) a second set of output gradient tiles and(ii) second output weight gradients for the second input layer.

3. The data processing system of claim 2, wherein the second forwardsubgraph succeeds the first forward subgraph in the sequence of forwardsubgraphs.4. The data processing system of claim 3, wherein the first backwardsubgraph succeeds the second backward subgraph in the sequence ofbackward subgraphs.5. The data processing system of claim 4, wherein the runtime logic isfurther configured to generate the second set of non-overlapping inputgradient tiles with respect to a cost function.6. The data processing system of claim 2, wherein the second backwardtopology of tiling configurations is different from the first backwardtopology of tiling configurations.7. The data processing system of claim 4, wherein the runtime logic isfurther configured to

aggregate the second set of output gradient tiles into an aggregateinput stored in memory; and

read the first set of non-overlapping input gradient tiles from theaggregate input.

8. The data processing system of claim 4, wherein the runtime logic isfurther configured to:

generate the second set of output gradient tiles of the second backwardsubgraph in an overlapping tiling configuration; and

write the second set of output gradient tiles in a memory in theoverlapping configuration, wherein an overlapping region between any twoneighboring output gradient tiles of the second set of output gradienttiles comprises an aggregate of a corresponding region of a firstneighboring output gradient tile of the second set of output gradienttiles and a corresponding region of a second neighboring output gradienttile of the second set of output gradient tiles.

9. The data processing system of claim 8, wherein the runtime logic isfurther configured to:

retile the second set of output gradient tiles written in the memory, togenerate the first set of non-overlapping input gradient tiles.

10. The data processing system of claim 8, wherein:

the second set of output gradient tiles written in the memory comprises(i) a central region and (ii) peripheral region surrounding the centralregion and forming a border around the central region; and

the central region is retiled to generate the first set ofnon-overlapping input gradient tiles.

11. The data processing system of claim 10, wherein:

the peripheral region of the second set of output gradient tiles writtenin the memory is not included in the first set of non-overlapping inputgradient tiles.

12. The data processing system of claim 11, wherein:

the peripheral region of the second set of output gradient tiles is notprocessed by the first backward subgraph.

13. The data processing system of claim 4, wherein:

a number of output gradient tiles in the second set of output gradienttiles is same as a number of input gradient tiles in the first set ofnon-overlapping input gradient tiles;

a size of each output gradient tile in the second set of output gradienttiles is the same;

a size of each input gradient tile in the first set of non-overlappinginput gradient tiles is the same; and

the size of each output gradient tile in the second set of outputgradient tiles is larger than the size of each input gradient tile inthe first set of non-overlapping input gradient tiles.

14. The data processing system of claim 1, wherein:

gradient tiles in the first set of intermediate gradient tiles shareoverlapping regions with adjacent gradient tiles in the first set ofintermediate gradient tiles;

the runtime logic is further configured to store the gradient tiles inthe first set of intermediate gradient tiles such that the overlappingregions are redundantly localized in each of the gradient tiles in thefirst set of intermediate gradient tiles to form a modified first set ofstandalone intermediate gradient tiles with no overlaps; and

the runtime logic is further configured to read the modified first setof standalone intermediate gradient tiles with no overlaps on atile-by-tile basis to generate the first set of further intermediategradient tiles and/or the first intermediate weight gradients.

15. The data processing system of claim 14, wherein:

tiles in the first set of intermediate tiles share overlapping regionswith adjacent tiles in the first set of intermediate tiles;

the runtime logic is further configured to store the tiles in the firstset of intermediate tiles such that the overlapping regions areredundantly localized in each of the tile in the first set ofintermediate tiles to form a modified first set of standaloneintermediate tiles with no overlaps; and

the runtime logic is further configured to read the modified first setof standalone intermediate tiles with no overlaps on a tile-by-tilebasis to generate the first set of further intermediate gradient tilesand/or the first intermediate weight gradients.

16. The data processing system of claim 1, wherein:

gradient tiles in the first set of further intermediate gradient tilesshare overlapping regions with adjacent gradient tiles in the first setof further intermediate gradient tiles;

the runtime logic is further configured to store the gradient tiles inthe first set of further intermediate gradient tiles such that theoverlapping regions are redundantly localized in each of the gradienttiles in the first set of further intermediate gradient tiles to form afirst set of standalone further intermediate gradient tiles with nooverlaps; and

the runtime logic is further configured to read the first set ofstandalone further intermediate gradient tiles on a tile-by-tile basisto generate the first set of output gradient tiles and/or the firstoutput weight gradients.

17. The data processing system of claim 2, wherein the runtime logic isfurther configured to read the second set of non-overlapping outputtiles on a tile-by-tile basis to generate the second set ofnon-overlapping input gradient tiles.18. The data processing system of claim 1, wherein the runtime logic isfurther configured to read the first set of non-overlapping inputgradient tiles on a tile-by-tile basis to generate the first set ofintermediate gradient tiles.19. The data processing system of claim 2, wherein a third forward graphsucceeds the second forward subgraph in the sequence of forward graphs.20. The data processing system of claim 19, wherein the second backwardsubgraph succeeds a third backward subgraph in the sequence of backwardsubgraphs.21. The data processing system of claim 20, wherein the runtime logic isfurther configured to execute the third backward subgraph in a thirdbackward topology of tiling configurations, wherein the third backwardtopology of tiling configurations is different from the second backwardtopology of tiling configurations and the first backward topology oftiling configurations.22. The data processing system of claim 1, wherein the runtime logic isfurther configured to use the weight gradients to update weights oflayers in the sequence of layers, and to use the layers with the updatedweights for inference.23. The data processing system of claim 22, wherein the runtime logic isfurther configured to update the weights on mini-batch cycle-basis.24. The data processing system of claim 1, wherein the runtime logic isfurther configured to use an index tensor of non-overlapping tiles forpooling operations for the backward propagation.25. The data processing system of claim 1, wherein the runtime logic isfurther configured to:

update weights of the first input layer, based at least in part on thefirst output weight gradients;

update weights of the first intermediate layer, based at least in parton the first intermediate weight gradients; and

update weights of the first output layer, based at least in part on thefirst input weight gradients.

26. The data processing system of claim 1, wherein:

the first set of intermediate gradient tiles comprises overlappinggradient tiles, such that gradient tiles in the first set ofintermediate gradient tiles share overlapping regions with adjacentgradient tiles in the first set of intermediate gradient tiles.

27. The data processing system of claim 1, wherein:

the first set of further intermediate gradient tiles comprisesoverlapping gradient tiles, such that gradient tiles in the first set offurther intermediate gradient tiles share overlapping regions withadjacent gradient tiles in the first set of further intermediategradient tiles.

28. The data processing system of claim 1, wherein:

the first set of output gradient tiles comprises overlapping gradienttiles, such that gradient tiles in the first set of output gradienttiles share overlapping regions with adjacent gradient tiles in thefirst set of output gradient tiles.

29. A data processing system configured, comprising:

compile time logic configured to

-   -   partition training of a graph into a sequence of forward pass        subgraphs and a sequence of backward pass subgraphs,    -   configure forward pass subgraphs in the sequence of forward pass        subgraphs to generate outputs with non-overlapping tiles, and    -   configure backward pass subgraphs in the sequence of backward        pass subgraphs to process inputs with non-overlapping tiles; and

runtime logic configured with the compile time logic to execute theconfigured forward pass subgraphs and the configured backward passsubgraphs.

While the present invention is disclosed by reference to the preferredimplementations and examples detailed above, it is to be understood thatthese examples are intended in an illustrative rather than in a limitingsense. It is contemplated that modifications and combinations willreadily occur to those skilled in the art, which modifications andcombinations will be within the spirit of the invention and the scope ofthe following clauses.

What is claimed is:
 1. A data processing system, comprising: compiletime logic configured to section a graph into a sequence of sections,the sequence of sections including at least a first section and a secondsection, configure the first section with a first topology of tilingconfigurations in which to tile inputs, intermediate outputs, and finaloutputs of the first section, and configure the second section with asecond topology of tiling configurations in which to tile inputs,intermediate outputs, and final outputs of the second section, whereinthe first topology of tiling configurations is different from the secondtopology of tiling configurations; and runtime logic configured with thecompile time logic to execute the first section to generate the inputs,intermediate outputs, and final outputs of the first section in thefirst topology of tiling configurations, and execute the second sectionto generate the inputs, intermediate outputs, and final outputs of thesecond section in the second topology of tiling configurations.
 2. Thedata processing system of claim 1, wherein the first topology of tilingconfigurations is determined based on a number of processing nodes inthe first section.
 3. The data processing system of claim 1, wherein thefirst topology of tiling configurations is determined based onrespective processing logics implemented by respective processing nodesin the first section.
 4. The data processing system of claim 1, whereinthe first topology of tiling configurations is determined based on asize of the inputs of the first section.
 5. The data processing systemof claim 1, wherein the first topology of tiling configurations isdetermined based on a size of the final outputs of the first section. 6.The data processing system of claim 1, wherein the second topology oftiling configurations is determined based on one or more of (i) a numberof processing nodes in the second section, (ii) respective processinglogics implemented by respective processing nodes in the second section,(iii) on a size of the inputs of the second section, and (iv) a size ofthe final outputs of the second section.
 7. The data processing systemof claim 1, wherein the sequence of sections includes at least a thirdsection, wherein the compile time logic is further configured toconfigure the third section with a third topology of tilingconfigurations in which to tile inputs, intermediate outputs, and finaloutputs of the third section, wherein the third topology of tilingconfigurations is different from the first topology of tilingconfigurations and the second topology of tiling configurations; andwherein the runtime logic is further configured to execute the thirdsection to generate the inputs, intermediate outputs, and final outputsof the third section in the third topology of tiling configurations. 8.The data processing system of claim 1, wherein the first topology oftiling configurations includes respective tiling configurations for theinputs, intermediate outputs, and final outputs of the first section. 9.The data processing system of claim 1, wherein the graph is aconvolutional neural network, sections in the sequence of sections areforward pass subgraphs, wherein the sections are backward passsubgraphs, wherein the inputs, intermediate outputs, and final outputsof the first section are image data, wherein the inputs, intermediateoutputs, and final outputs of the second section are image data.
 10. Thedata processing system of claim 1, wherein the graph is a convolutionalneural network, wherein sections in the sequence of sections arebackward pass subgraphs, wherein the inputs, intermediate outputs, andfinal outputs of the first section are input gradients, and wherein theinputs, intermediate outputs, and final outputs of the second sectionare input gradients.
 11. The data processing system of claim 1, whereinthe final outputs of the first section have a non-overlapping finaltiling configuration, the intermediate outputs of the first section havecorresponding one or more overlapping intermediate tilingconfigurations, and the input of the first section has an overlappinginput tiling configuration.
 12. The data processing system of claim 1,wherein the compile time logic is further configured to: determine, forthe first section, the first topology of tiling configurations bystarting from the final outputs of the first section, and reversetraversing through the intermediate outputs of the first section, andending with the inputs of the first section.
 13. A computer implementedmethod for executing sections of a graph, the method comprising:sectioning a data flow graph into a sequence of sections, the sequenceof sections including at least a first section and a second section;configuring the first section with a first topology of tilingconfigurations in which to tile inputs, intermediate outputs, and finaloutputs of the first section; configuring the second section with asecond topology of tiling configurations in which to tile inputs,intermediate outputs, and final outputs of the second section, whereinthe first topology of tiling configurations is different from the secondtopology of tiling configurations; executing the first section togenerate the inputs, intermediate outputs, and final outputs of thefirst section in the first topology of tiling configurations; andexecuting the second section to generate the inputs, intermediateoutputs, and final outputs of the second section in the second topologyof tiling configurations.
 14. The method of claim 13, furthercomprising: determining the first topology of tiling configurations,based on one or more of (i) a number of processing nodes in the firstsection, (ii) respective processing logics implemented by respectiveprocessing nodes in the first section, (iii) a size of the inputs of thefirst section, and (iv) a size of the final outputs of the firstsection.
 15. The method of claim 13, further comprising: determining thesecond topology of tiling configurations, based on one or more of (i) anumber of processing nodes in the second section, (ii) respectiveprocessing logics implemented by respective processing nodes in thesecond section, (iii) on a size of the inputs of the second section, and(iv) a size of the final outputs of the second section.
 16. The methodof claim 13, wherein the first topology of tiling configurationsincludes respective tiling configurations for the inputs, intermediateoutputs, and final outputs of the first section.
 17. The method of claim13, wherein the graph is a convolutional neural network, sections in thesequence of sections are forward pass subgraphs, wherein the sectionsare backward pass subgraphs, wherein the inputs, intermediate outputs,and final outputs of the first section are image data, wherein theinputs, intermediate outputs, and final outputs of the second sectionare image data.
 18. The method of claim 13, wherein the graph is aconvolutional neural network, wherein sections in the sequence ofsections are backward pass subgraphs, wherein the inputs, intermediateoutputs, and final outputs of the first section are input gradients, andwherein the inputs, intermediate outputs, and final outputs of thesecond section are input gradients.
 19. A non-transitory computerreadable storage medium impressed with computer program instructions,the instructions, when executed on a processor, implement a methodcomprising: sectioning a data flow graph into a sequence of sections,the sequence of sections including at least a first section and a secondsection; configuring the first section with a first topology of tilingconfigurations in which to tile inputs, intermediate outputs, and finaloutputs of the first section; configuring the second section with asecond topology of tiling configurations in which to tile inputs,intermediate outputs, and final outputs of the second section, whereinthe first topology of tiling configurations is different from the secondtopology of tiling configurations; executing the first section togenerate the inputs, intermediate outputs, and final outputs of thefirst section in the first topology of tiling configurations; andexecuting the second section to generate the inputs, intermediateoutputs, and final outputs of the second section in the second topologyof tiling configurations.
 20. The non-transitory computer readablestorage medium of claim 19, wherein the final outputs of the firstsection have a non-overlapping final tiling configuration, theintermediate outputs of the first section have corresponding one or moreoverlapping intermediate tiling configurations, and the input of thefirst section has an overlapping input tiling configuration.